Problem solve Get help with specific problems with your technologies, process and projects.

Backup batch jobs not running

I have created some backup batch files that run every day at 12pm, but for some reason they stop running and give the error ora-12640. If I click on them directly they run ok, but if I program them to run at night they don't run. Can you please help?
I'm assuming that you are running on a Windows platform. And I further assume that your backup script runs on the same server as your database. If those assumptions are incorrect, then this advice may not work.

The first thing I'd do is to explicitly code your environment variables in your backup script. So the first thing I'd have the script do is as follows:

set ORACLE_SID=my_db
set ORACLE_HOME=c:oracleora92

Make sure to substitute correct values for your environment.

The ORA-12640 error in Windows environment most often means that your connection request to the database cannot find the database because it does not have the correct environment variables. When you run the batch program from your Windows session, it inherits any environment variables defined for your user. But running batch programs is a little different. The above lines should fix your problem.

You might also want to make sure that you schedule this job as a user in the oradba group.

Dig Deeper on Oracle database backup and recovery

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.