patternMinor
ORA-12546: TNS:permission denied, on Windows through Task Scheduler
Viewed 0 times
schedulertnspermissiondeniedorawindowsthrough12546task
Problem
I am trying to export all objects of specific oracle user by executing a batch file through Windows Task Scheduler:
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:
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
I noticed that export of tables, however, works fine even in the task started by schedule:
At any rate, the oracle user “myuser” has oracle rights to export entire database
Problem:
Only-tables are exported fine, but with
exp.exe myuser/pass@dbname owner=myuser log=mylog.txtThe 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 deniedWhen 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 differenceI 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.txtAt 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?Solution
The problem lies somewhere deep in windows permissions. Those are messing somehow with Oracle TNS system. I still do not know the right way and what exactly those permissions are, but the problem is solved for now, by means of bypassing TNS, as self-suggested previously:
This works, no error
set ORACLE_SID=dbnameexp.exe myuser/pass owner=myuser log=mylog.txtThis works, no error
Context
StackExchange Database Administrators Q#122081, answer score: 2
Revisions (0)
No revisions yet.