Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I call DBMS_SCHEDULER Jobs from CommandText in C#?

user3191291Jan 16 2014 — edited Feb 10 2014

It is OK when I run the command, exec sys.DBMS_SCHEDULER.run_JOB('SYS.My_Job'); on sql *Plus.

An error, "PLS-00103: Encountered the symbol \"SYS\" when expecting one of the following:\n\n,,." was received when I tried to call DBMS_SCHEDULER jobs using DBMS_SCHEDULER.run_job from CommandText in C# as the following.

Oracle.DataAccess.Client.OracleCommand cmd = conn.CreateCommand();

cmd.CommandText = "exec sys.DBMS_SCHEDULER.run_job('SYS','My_Job');";

cmd.CommandType = System.Data.CommandType.StoredProcedure;

cmd.Connection = conn;

I would appreciate if you can help me. Thanks.

cyh

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2014
Added on Jan 16 2014
7 comments
4,037 views