I am trying to export all objects of specific oracle user by executing a batch file through Windows Task Scheduler:
exp.exe myuser/pass@dbname owner=myuser log=mylog.txt
The Oracle 11.2.0.4 x64 and the database are on that same Windows7 Pro machine
The task starts OK. That is to mean that no wrong user or password issues are there. But when task is started by schedule, it says in the log:
ORA-12546: TNS:permission denied
When task is started manually, under same user as the scheduled user (this user is member of Administrators group and ora_dba group, by the way), it works fine and export is done. The task is scheduled with an "Execute with highest privileges" check-box in task properties, so I don't see why there is difference between the "by schedule" and "manual" task start.
I've read a lot on "ORA-12546: TNS:permission denied" on stackoverflow site, but all topics are concerning Linux. I tried to set read and execute permissions on c:\app\oracle
, where my Oracle is installed. Actually, Administrators already by default had all permissions on that directory, so it did not make any difference
I noticed that export of tables, however, works fine even in the task started by schedule:
exp.exe myuser/pass@dbname tables=mytable1,mytable2 log=mylog.txt
At any rate, the oracle user “myuser” has oracle rights to export entire database
Problem:
Only-tables are exported fine, but with «owner=myuser»
export key I get «TNS:permission denied»
, and only if Windows scheduled task is started by schedule, while manually started task does everything OK. How do I make it export all, and by schedule?
ORACLE_HOME
andTNS_ADMIN
environment variables correct for the Administrator that run the scheduler?