on 01-07-2010 11:25 AM
Dear All,
I was trying to use the Sender JDBC adapter to call the Stored procedure in the Sender JDBC adapter is possible to do this???
I don't think Sender JDBC Adapter is supported to execute the Oracle Started Procedures. With my understanding only the Receiver JDBC Adapter will supported for the Stored Procedures using the message mapping Action = EXECUTE and Table = DBO.EmployeeMasterTable.
Please let me know how to achieve the below scenario.
My Scenario JDBC to RFC
Query SQL Statement:
select * from dbo.emp where flag = 'Insert' or flag = 'Update' or flag = 'Delete'
Update SQL Statement:
UPDATE dbo.emp SET flag = null WHERE flag IN ('Insert', 'Update');
DELETE dbo.emp WHERE flag = 'Delete';
In the my update statement I need to update few data flag with Insert , Update and need to delete the of the old records as mentioned above the query.
In the response mapping I am using the Action = INSERT and Table = emp.
Thanks,
Jane F.
Hi Jane,
>I don't think Sender JDBC Adapter is supported to execute the Oracle Started Procedures. With my understanding only the Receiver JDBC Adapter will supported for the Stored Procedures using the message mapping Action = EXECUTE and Table = DBO.EmployeeMasterTable.
Yes SP is now supported by Sender JDBC Adapter. Check this note:Note 941317 - XI / PI JDBC Adapter: Known Problems / Incompatibilities
Coming to your problem, if you are using SP then why to separate Select and update/delete task... Do everything in SP and send back the result to PI
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jane,
>>My requirment is to select from the DB and update and delete needs to be done. How I need to call this stored procedure in Sender JDBC adapter.
An example of SP call is mentioned in the previous note Note 941317 - XI / PI JDBC Adapter: Known Problems / Incompatibilities
SP Code
---------- pkg1 ----------
CREATE PACKAGE pkg1 AS
TYPE numset_t IS TABLE OF NUMBER;
FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED;
END pkg1;
/
CREATE PACKAGE BODY pkg1 AS
-- FUNCTION f1 returns a collection of elements (1,2,3,... x)
FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED IS
BEGIN
FOR i IN 1..x LOOP
PIPE ROW(i);
END LOOP;
RETURN;
END;
END pkg1;
/
In sender channel mention
>> SELECT * FROM TABLE(pkg1.f1(5));
>>Is this need to be in the one stored procedure right. Can ou let me know how it should be handled in JDBC Adapter.
Yes it shoudl be a single SP. Mention a select statement as given in above example.
What is your Oracle version?
Regards
Suraj
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.