Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Executing exp as batch job fails
Hello
Using Oracle 9.2.0.4/Windows 2000 I am trying to schedule an automatic dump of a database from a DOS window:
at 17:00 /every:th d:\oracle\ora92\database\archive\dump.bat
(meaning: execute dump.bat every Thursday at 17:00 hours)
dump.bat contains:
d:
REM SET ORACLE_SID=mysid
cd D:\oracle\ora92\database\archive
REM exp parfile=dump.par
exp system/****@mysid consistent=y compress=no file=mysid.dmp
log=mysid.log full=y
Then I get:
EXP-00056: ORACLE error 12154 encountered ORA-12154: TNS:could not resolve service name EXP-00000: Export terminated unsuccessfully
But when executing dump.bat directly (interactively), it works fine, so an error in tnsnames.ora or sqlnet.ora can be ruled out.
The same thing using a parameter file: if the batch job runs scheduled, it fails. "tnsping mysid" works fine from the prompt. I tried also using apostrophes and single quotes for the userid parameter. I have no problem connecting to the database locally as the administrator or using sqlplusw and the same credentials for the user system.
I also read
http://www.dbaoncall.net/references/ht_run_export_on_nt.html
but could not solve the problem.
I work usually from Unix but this time I am challenged by Windows/DOS idiosyncracies.
Any hint?
Thanks
Rick Denoire
Received on Thu Nov 24 2005 - 17:14:41 CST