Skip to Main Content

Oracle Database Discussions

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!

dbms_scheduler.run_job and nls_date_format

299407Oct 5 2008 — edited Oct 7 2008
hi,
does dbms_scheduler.run_job change nls_date_format? what nls_date_format is uses?


SQL> select sysdate from dual;


SYSDATE
-------------------
2008-10-05 10:50:29



--this is the actual procedure, if i call it directly it works fine
SQL> declare
2 l_ret boolean;
3 begin
4 l_ret := part_mgmt.init(p_process_name_in => 'ADD_PARTITION',
5 p_run_date_in => to_char(add_months(sysdate,1),'YYYYMMDD'));
6 end;
7 /


PL/SQL procedure successfully completed.



SQL> select sysdate from dual;


SYSDATE
-------------------
2008-10-05 10:50:49



--but if i call the job it fails and changes the nls_date_format
SQL> exec dbms_scheduler.run_job('ADD_PARTITION');
BEGIN dbms_scheduler.run_job('ADD_PARTITION'); END;


*
ERROR at line 1:
ORA-01861: literal does not match format string
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 1



SQL> select sysdate from dual;


SYSDATE
-------------------
05-OCT-08


how do i make sure that run_job uses correct nls_date_format

i have tried setting nls_Date_format using alter system and also using logon trigger

Thanks for your help,
pakya
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2008
Added on Oct 5 2008
4 comments
2,335 views