Problem with applying SYS.DBMS_SCHEDULER.CREATE_JOB on 10G

Problem with applying SYS.DBMS_SCHEDULER.CREATE_JOB on 10G

Postby Motia » Fri 04 Dec 2009 15:28

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
<<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 32:
PLS-00103: Encountered the symbol "" when expecting one of t
------------------------------
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
(
job_name => '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;
Motia
 
Posts: 3
Joined: Wed 08 Nov 2006 10:41

Postby StanislavK » Mon 07 Dec 2009 17:19

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby Motia » Tue 08 Dec 2009 09:47

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/1601744/strange-behaviour-with-a-pl-sql-query-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", "");
Motia
 
Posts: 3
Joined: Wed 08 Nov 2006 10:41

Postby StanislavK » Tue 08 Dec 2009 13:52

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle