Ask the Expert

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?

    Requires Free Membership to View

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.

This was first published in April 2004

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: