Home » SQL & PL/SQL » SQL & PL/SQL » Execute dbms_scheduler.enable from variable
Execute dbms_scheduler.enable from variable [message #269911] Tue, 25 September 2007 02:11 Go to next message
Messages: 17
Registered: March 2006
Junior Member
hi all,

I have a problem while executing this PL/SQL block:
query varchar2(100);


query := 'DBMS_SCHEDULER.enable (''tomk.job_test_name'')';

execute immediate query;


I get an error :
ORA-00900: invalid SQL statement
ORA-06512: at line 13

how to execute it? unfortunatelly I have to put 'DBMS_SCHEDULER.enable ...' into variable :/

Thanks in advance
Re: Execute dbms_scheduler.enable from variable [message #269916 is a reply to message #269911] Tue, 25 September 2007 02:18 Go to previous message
Michel Cadot
Messages: 65076
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
enclose it between BEGIN and END to make it a PL/SQL block.

query := 'BEGIN DBMS_SCHEDULER.enable (''tomk.job_test_name'');END;';


Previous Topic: Sqlplus running too long
Next Topic: Error Handling
Goto Forum:

Current Time: Thu Jul 20 07:56:02 CDT 2017

Total time taken to generate the page: 0.11141 seconds