Home » RDBMS Server » Server Administration » Error message in oracle scheduler (oracle, 10g, windows xp)
Error message in oracle scheduler [message #550558] Tue, 10 April 2012 06:50 Go to next message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi All,

I want to create a schedule as below. But it shows error message which i cant understand.

begin
DBMS_SCHEDULER.CREATE_jOB(
    job_name        =>  'Alert_monitor',
    job_type        =>  'Stored_Procedure',
    job_action      =>  'alertmon_email_send_proc',
    start_date      =>  '10-Apr-12 2.00.00 PM',   
    repeat_interval =>  'FREQ=hourly;interval=4', 
    enabled         =>  'true',
    comments        =>  'This is to server alert message');
end;


Here is the error message.

Error at line 1
ORA-06550: line 2, column 1:
PLS-00306: wrong number or types of arguments in call to 'CREATE_JOB'
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored


Kindly help me.

Regards
Muktha
Re: Error message in oracle scheduler [message #550560 is a reply to message #550558] Tue, 10 April 2012 07:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
START_DATE is a timestamp with time zone NOT a string.
ENABLED is a BOOLEAN not a string.
It is easy to read the documentation to know what are the parameter types.

Regards
Michel
Re: Error message in oracle scheduler [message #550566 is a reply to message #550560] Tue, 10 April 2012 07:28 Go to previous messageGo to next message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi Michel,

Thanks for the advice, But one correction.

Even though START_DATE is a DATE data type. we should enclose them inside the single quote.
Yes, ofcourse i did mistake in the case of ENABLED.

Thanks and Regards
Muktha
Re: Error message in oracle scheduler [message #550569 is a reply to message #550566] Tue, 10 April 2012 07:33 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This:

'10-Apr-12 2.00.00 PM'

is a string. You should convert it to timestamp with time zone using appropriate function (such as TO_TIMESTAMP_TZ).
Previous Topic: how to get the ddl of a view
Next Topic: Oracle DB Server Migration Checklist
Goto Forum:
  


Current Time: Thu Apr 18 18:00:37 CDT 2024