Error while Calling SP from 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

oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Error while Calling SP from OCI Stage

Post by oacvb »

Hi,

I am trying to call SP from SQL --> Before tab by using the following command {call SP_CID_EXTRACT_CUST_DATA_FIX1()} but it gives the following error.

ORA-00911: invalid character

It is working fine If i call the same SP through script / sql prompt / toad. Can anyone help me in resolving the issue.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't have a semi-colon at the end, do you?
-craig

"You can never have too many knives" -- Logan Nine Fingers
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Yeap.I have at the end. Sorry, forgot to copy that. Please see the below statement from Before SQL tab.

{call SP_CID_EXTRACT_CUST_DATA_FIX1()};
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Remove it. And silly question - are the curly braces actually there as well?

Try just this:

call SP_CID_EXTRACT_CUST_DATA_FIX1()
-craig

"You can never have too many knives" -- Logan Nine Fingers
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Might be silly to you. I tried it and got the following error.

ORA-06576: not a valid function or procedure name
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So now it is being called but cannot be found. Does the user you are connecting as own the stored procedure? Have execute permissions on it? You may need to change who you are connecting as, or specify the schema owner in the call statement, or setup a synonym.

Assuming the name as typed actually exists.
-craig

"You can never have too many knives" -- Logan Nine Fingers
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

It's available, I could able to execute thorugh shell script for the same user.
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

Is it the ONLY command in the BEFORE SQL tab?
Ross Leishman
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Yes.that's only that command..
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I too have seen this funny thing especially with the CALL. I dont exactly remember what I did to overcome that.
Just Try call SP_CID_EXTRACT_CUST_DATA_FIX1.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

When you call it from TOAD or any other sql tool within the instance, you dont need to prefix the stored proc. with the schema name. But within DataStage you do need to fully qualify the name by prefixing the user to the stored proc.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Not really a mandate option. If you are opting for that, make sure the schema name should be parameterized.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

DSguru2B wrote:When you call it from TOAD or any other sql tool within the instance, you dont need to prefix the stored proc. with the schema name. But within DataStage you do need to fully qualify the name by prefixing the user to the stored proc.
No, you don't. The rules how Oracle derives ownership don't suddenly change in DataStage. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

They dont... Huh !
Well I guess I have always fully qualified it and hence my rather wrong understanding. But it does'nt hurt to fully qualify the name. The OP should try it.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

I tried as Kumar mention, still having the same issue.
Post Reply