ORA-00900: invalid SQL statement

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
NSIT-DVP-01
Premium Member
Premium Member
Posts: 46
Joined: Wed May 16, 2007 1:54 am
Location: Paris
Contact:

ORA-00900: invalid SQL statement

Post by NSIT-DVP-01 »

Hello,

I have the exact same problem as this with DataStage Server 8.1

I have tried to execute the following code from the "Before" tab of the SQL statement in the Oracle Stage:

Code: Select all

exec dbms_stats.gather_table_stats(ownname => 'MA_ODS', tabname => 'ODS_ITEM', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY', degree => 8, granularity => 'ALL', cascade => TRUE);
I have also tried with:

Code: Select all

begin
dbms_stats.gather_table_stats[...];
end;
and

Code: Select all

CALL dbms_stats.gather_table_stats[...];
(I have tried with and without simicolon, with simple/double quotes etc.)

But I get the same error: ORA-00900: invalid SQL statement

Please note that I have no problem running this with SQL Developer on the same database (Oracle 10g) and with the same user.

Looks like DataStage does not support this ? But isn't DataStage using SQL plus to execute what you enter in the Before/After SQL statement ?

An other project in the company had the same problem, and they used an insert statement in the "before SQL" to execute a trigger instead. But we can't do the same, because we had a no go from our Database admins to use this method.

Thanks for your help ! :)
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
Just few days before,i have implemented stored proc in oracle connector stage in my before sql statements,you can go throgh the link below:-

viewtopic.php?t=149119

And its working fine for me.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: Please always start a new topic when you have a problem of your own, even when it's the "exact same problem". If you really feel the need, link back to the other post as I've done in your post.

Thanks.
-craig

"You can never have too many knives" -- Logan Nine Fingers
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

Did you try executing this in SQL Plus.
One thing we can try
Use positional parameter instead of =>
Remove the package constant and hard code it.
Thanks,
Prasanna
Post Reply