Home » SQL & PL/SQL » SQL & PL/SQL » Scheduler not running for users other than sys (Oracle 11g, Server 2003)
Scheduler not running for users other than sys [message #406525] Thu, 04 June 2009 07:08 Go to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Hello All,

My problem is associated with oracle scheduler.
I am creating a job using Enterprise Manager.
In this job I am providing inline schedule and command type is EXECUTABLE.

Now if I create this job as SYS user then this job is executing successfully.

But If I create this job as any other normal user then it executes with status fail.
and following is the log output

Quote:
ORA-27370: job slave failed to launch a job of type EXECUTABLE
ORA-27300: OS system dependent operation:accessing execution agent failed with status: 2
ORA-27301: OS failure message: The system cannot find the file specified.
ORA-27302: failure occurred at: sjsec 6a
ORA-27303: additional information: The system cannot find the file specified.


Can anyone help me please in solving this problem?

regards,
Delna

[Edit MC: code tags changed to quote one and single line splitted at each error]

[Updated on: Thu, 04 June 2009 07:45] by Moderator

Report message to a moderator

Re: Scheduler not running for users other than sys [message #406531 is a reply to message #406525] Thu, 04 June 2009 07:44 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Don't use code tags or split the lines to 80 characters.
Do NOT let your stuff in a single line above all when there are several lines.

Regards
Michel

Re: Scheduler not running for users other than sys [message #406533 is a reply to message #406525] Thu, 04 June 2009 07:54 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
As I copy-pasted it from console, it was containing mare than 80 chars without line breaks.
Sorry for that.

regards,
Delna
Re: Scheduler not running for users other than sys [message #406538 is a reply to message #406533] Thu, 04 June 2009 08:31 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is the interest of the "Preview Message" button.

Regards
Michel
Re: Scheduler not running for users other than sys [message #406607 is a reply to message #406538] Thu, 04 June 2009 23:32 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Alright.
But out of these many reply, no one is regarding my problem.
Any useful comment please?

regards,
Delna
Re: Scheduler not running for users other than sys [message #406612 is a reply to message #406607] Thu, 04 June 2009 23:58 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Any useful comment please?

Quote:
The system cannot find the file specified

Regards
Michel
Re: Scheduler not running for users other than sys [message #406624 is a reply to message #406612] Fri, 05 June 2009 00:50 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Quote:
Quote:
The system cannot find the file specified



As I said earlier, same JOB is running perfactly for SYS schema.
That means SYS finds that file and others not. Laughing
Isn't it like 'Only SYS user can run scheduled job' or some thing like that?
And some special privilages required by other users to run scheduled job?

regards,
Delna
Re: Scheduler not running for users other than sys [message #406625 is a reply to message #406624] Fri, 05 June 2009 00:53 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
- Never ever use SYS but for maintenance purpose (startup, shutdown, backup, recover)
- SYS is special
- SYS is Oracle proprietary (try to open a SR/TAR starting with "i did that with SYS" and you'll see the immediate answer)
- SYS does not act like any other user
- When you use SYS Oracle deactivates some code path and activates others
- Whatever you do with SYS will neither validate nor invalidate the same thing with any other user.

NEVER EVER use SYS for anything that can be done by another user.
Use SYS ONLY for something that can't be done by someone else.


Regards
Michel
Re: Scheduler not running for users other than sys [message #406674 is a reply to message #406625] Fri, 05 June 2009 05:42 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
It might be a directory privileges problem - is there a directory involved, and if so, does the non-sys user you want to run the job as ahve Read priviliges on it.

Failing that, you're going have to prvide us with some details of what the Scheduler job does.

Metalink note 579365.1 is a guide to troubleshooting ORA-27300 errors.
Re: Scheduler not running for users other than sys [message #406715 is a reply to message #406674] Fri, 05 June 2009 08:35 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Thank you Michel sir and JRowbottom sir for your concern.

@JRowbottom
Quote:
is there a directory involved, and if so,

To execute external executable file we are not required to create DIRECTORY. We have to specify full path of that executable file.

See example

and I create JOB as
...
dbms_scheduler.create_job(job_name => 'SEO_PING',
  job_type => 'EXECUTABLE',
  job_action => 'C:\WINDOWS\SYSTEM32\CMD.EXE /C D:\SEO_PING\PNG.BAT ' || p_url_i,
  auto_drop => true,
  enabled => true);
dbms_scheduler.run_job('SEO_PING');
...

Quote:
prvide us with some details of what the Scheduler job does.



As per my knowledge, DBMS_SCHEDULER is package introduced in 10g and is same as DBMS_JOB in previous version, with extra functionality.
And is used to run predefined work(JOB) at particular time in background (I think, I am not required to provide this detail as you are the GURU).

More is here

regards,
Delna

[Updated on: Fri, 05 June 2009 08:45] by Moderator

Report message to a moderator

Re: Scheduler not running for users other than sys [message #406721 is a reply to message #406715] Fri, 05 June 2009 08:43 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
As per my knowledge, DBMS_SCHEDULER is package introduced in 10g and is same as DBMS_JOB in previous version, with extra functionality

No, it is a different feature that has no relation (but scheduling something).

Regards
Michel
Re: Scheduler not running for users other than sys [message #406722 is a reply to message #406715] Fri, 05 June 2009 08:43 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
And what happens when you go to the command prompt on the server and run D:\SEO_PING\PNG.BAT ?
Re: Scheduler not running for users other than sys [message #406797 is a reply to message #406722] Fri, 05 June 2009 23:22 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
It is working as desired.

regards,
Delna
Re: Scheduler not running for users other than sys [message #406800 is a reply to message #406721] Fri, 05 June 2009 23:29 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Good morning Michel sir,

Quote:
In Oracle 10g the DBMS_JOB package is replaced by the DBMS_SCHEDULER package. The DBMS_JOB package is now depricated and in Oracle 10g it's only provided for backward compatibility. From Oracle 10g the DBMS_JOB package should not be used any more, because is could not exist in a future version of Oracle.



from here

regards,
Delna
Re: Scheduler not running for users other than sys [message #406812 is a reply to message #406800] Sat, 06 June 2009 01:03 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Every one can say what he wants and every one can say wrong stuff.
And this is wrong.

Regards
Michel
Re: Scheduler not running for users other than sys [message #406827 is a reply to message #406812] Sat, 06 June 2009 03:15 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Hello everybody,

Finally I got rid of my problem.
Following is work around.

1>I create one package in SYS schema.
2>One procedure in that package
3>Create JOB using DBMS_SCHEDULER package
4>GRANT EXECUTE on that package to required user.

that set.

By the way, thanks all.

regards,
Delna
Re: Scheduler not running for users other than sys [message #406832 is a reply to message #406827] Sat, 06 June 2009 03:53 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
1>I create one package in SYS schema.

End of your Oracle support.

Regards
Michel
Re: Scheduler not running for users other than sys [message #406854 is a reply to message #406832] Sat, 06 June 2009 11:12 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
http://oracle-randolf.blogspot.com/2009/05/user-objects-created-in-sys-schema-and.html Is that your testing Database.
Sad
Re: Scheduler not running for users other than sys [message #406975 is a reply to message #406525] Mon, 08 June 2009 01:38 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Hi Michel sir and ramoradba,

I read the post on this forum regularly.
And gradually I knew that it is not advisable to create object in SYS schema (said by Michel sir repeatedly).
But as I am helpless in this problem, I created that package in SYS schema. If any valid solution is available, I am searching for that. On getting perfect solution, I will post here.

regards,
Delna
Re: Scheduler not running for users other than sys [message #407025 is a reply to message #406975] Mon, 08 June 2009 03:42 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Metalink document 604641.1 describes your problem and the solution to it.
Previous Topic: DATATYPE HAVING STRING LENGTH MORE THAN 50000
Next Topic: How to Use Cross Tab query
Goto Forum:
  


Current Time: Sun Dec 04 12:33:58 CST 2016

Total time taken to generate the page: 0.13841 seconds