Passing string parameters to linked Oracle Server procedures from SQL Server

前端 未结 1 1308
别跟我提以往
别跟我提以往 2021-01-22 17:34

I have an Oracle procedure called P_CREATE_USER. It takes a single varchar2 parameter:

create or replace PROCEDURE 
P_CREATE_USER (P_US         


        
相关标签:
1条回答
  • 2021-01-22 17:59

    The solution required checking the Dynamic Parameters property in the OraOLEDB.Oracle driver in SQL Server (Server Objects/Linked Servers/Providers/OraOLEDB.Oracle).

    Then, to call the procedure, I had to do the following:

    DECLARE @userid varchar(50)
    SET @userid = 'MyUserId'
    EXECUTE ('BEGIN P_CREATE_USER(?); END;', @userid) AT ORACLE_SERVER
    
    0 讨论(0)
提交回复
热议问题