Page 1 of 1

Posted: Fri May 15, 2015 2:04 am
by ray.wurlod
'M' is not a valid day of the week.

ORA-20000: -1846 - ORA-01846: not a valid day of the week ORA-06512

Posted: Fri May 15, 2015 7:23 am
by chulett
Not sure if this helps or not. And we can't really answer your proc question without seeing the actual procedure's pl/sql code.

Posted: Thu May 21, 2015 6:13 am
by huge10
The problem was in the NLS_LANGUAGE setting for the DB.

Developing the oracle procedure with Toad or SQLTools I couldn't see that the default language was setted to ITALIAN.
Datastage set the default language to ENGLISH.

Inside the procedure there is some date function with the name of the day ... so with Toad or SQLTool the procedure doesn't catch any error, when the same procedure is launched by Datastage the "italian" name of the day is unrecognized and generates the error.

:-)

Posted: Thu May 21, 2015 4:38 pm
by ray.wurlod
That seems reasonable. How did you correct it? Presumably you set the NLS_LANGUAGE for your particular connection to "ENGLISH".

Posted: Wed May 27, 2015 8:36 am
by huge10
YES, I forced the use of NLS_LANGUAGE to "ENGLISH" inside my PL/SQL Procedure