Call Stored procedure in Oracle 8 OCI stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Call Stored procedure in Oracle 8 OCI stage

Post by rajeev_prabhuat »

Hi,

I want to call an stored procedure from Oracle 8 OCI stage, i called the procedure in the Before SQL as follows:
call TEST_SAN2();
But it showed me the following error
SAMPLE_ORACLE_CALL_PROC..Oracle_OCI_8_0: ORA-06576: not a valid function or procedure name
I tried executing the procedure from orace it is working fine. Can anyone help me in this regards.

Regards,
Rajeev Prabhu
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Do it within a SQL statement.
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Post by rajeev_prabhuat »

T42 wrote:Do it within a SQL statement.
Do you mean to say by giving Begin and end statement, i tried this also that is also not working.

Regards,
Rajeev Prabhu
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

In v7.5 you have the stored procedure stage.

Ogmios
In theory there's no difference between theory and practice. In practice there is.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, you don't need to build an anonymous block to call the procedure, a simple 'call' statement is supposed to work. :? I don't make use of them but others have reported success here several times using that syntax. From what I recall, do it from the Custom SQL area, not the Before or After SQL tabs.

Try it without the trailing semi-colon first. And unless you have a public synonym sitting over it, you may need to qualify it with the schema owner unless you are connecting to Oracle as that owner.
-craig

"You can never have too many knives" -- Logan Nine Fingers
wdudek
Participant
Posts: 66
Joined: Mon Dec 08, 2003 10:44 am

Post by wdudek »

I know we do this, but can't find the job at the moment. I know that we use execute instead of call, and that it is in the after sql on ours, so I would expect the before sql to work as well.
Post Reply