i want to create a cron job for export.
the command runs properly when executed on shell prompt.
but cron gives exp:0056 and ora:12154 error( tns)
"could not resolve service name"
why should it need tns for local access?
i even created a tns entry just to check but still didn't work.
07-24-2001, 07:34 AM
what does your cron do ???
if you do not do something like :
sqlplus login/password@instance << EOF
then it will try to connect using SQL*Net ...
07-24-2001, 07:44 AM
my cron calls a batch file that sets
some vaiable like sid,oracle_home
then uses export cmd
exp parfile=<> file=<>
parfile is in my backup directory.
the same batchfile executes properly from cmd line.
07-24-2001, 08:46 AM
ok, ok, ok ... so here are some ideas :
1st and most important) CHECK YOUR ENV !!
be VERY careful because when using cron, you rarely have the environment you think you have. if you're using root crontab, what I usually do is, in the crontab, call a shell like :