Page 1 of 1

Problem with applying SYS.DBMS_SCHEDULER.CREATE_JOB on 10G

Posted: Fri 04 Dec 2009 15:28
by Motia
Hi,
I have a problem with applying script on 10G server and using the latest provider 5.35.57.0
I was able to apply script below on 11G but was failed to apply it on 10G. Hovewer using 3rd party tool (TOAD) I was able to apply this script on 10G. (under the same user)
(Used OracleCommand and ExecuteNonQuery)
Exception says:
ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:

begin case declare exit for goto if loop mod null pragma
raise return select update while with
'TWC_ACCT_BATCH20090412171903'
,start_date => TO_TIMESTAMP('2009/12/04 17:19:03','yyyy/mm/dd hh24:mi:ss')
,job_type => 'STORED_PROCEDURE'
,job_action => 'MOUSE.QUEST_MOUSE.CAPTURE_STOP'
,comments => 'AAA'
,enabled => TRUE
);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'TWC_ACCT_BATCH20090412171903'
,attribute => 'AUTO_DROP'
,value => TRUE);
END;

Posted: Mon 07 Dec 2009 17:19
by StanislavK
Please specify your connection string, Oracle client version and call stack for the error you receive.

Also, I can send you a small project. Please change it so that we'll be able to reproduce the error.

We couldn't reproduce the problem at the moment.

Posted: Tue 08 Dec 2009 09:47
by Motia
Client version: 11.1.0.1
Server version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

Found out 2 workarounds:
1) Based on this
http://stackoverflow.com/questions/1601 ... ry-and-net
I did following replacement before executing and it became working.

Code: Select all

command.CommandText = command.CommandText.Replace("\r", "");
2) With using “OracleScript” instead of “OracleCommand and ExecuteNonQuery” my application works correctly.

P.S.
Theoretically I resolved my issue by using

Code: Select all

command.CommandText = command.CommandText.Replace("\r", "");

Posted: Tue 08 Dec 2009 13:52
by StanislavK
It seems that the problem really was connected with the different styles of line breaks. Please note that they are parsed on the database side and not inside the OracleCommand class.