locked
Could not execute statement on remote server 'HDDDEV'. RRS feed

  • Question

  • Hello. 

    i want to execute oracle procedure in my SQLServer using DBlink.

    Now DBlink(RPC and IN PROGRESS) setting is valid status.

    But i got a below message. What is that message? 

    Msg 7215, Level 17, State 1, Line 17
    Could not execute statement on remote server 'HDDDEV'.

    declare @aaa varchar(13) = '12345678';
    declare @bbb varchar(17) = 'N';
    declare @ccc varchar(10) = '112FAC1';
    declare @ddd varchar(10) = null;
    declare @eee varchar(10) = null;
    declare @RES_COD varchar(1) = null;
    declare @RES_NAM varchar(2000) = null;
    
    EXECUTE ('begin sorter_ord_info_mng.tml_rcv_his_prc(?,?,?,?,?); END; 
    ','111222333444','N','112FAC1',' @REC_COD OUTPUT, @REC_NAM OUTPUT) AT HDDDEV

    Oracle Client : 11g

    Target Oracle : 11g r2

    DBLink name : HDDDEV

    SQLServer Version : sqlserver 2019 std

    check picture please -> call procedure in sqlserver query


    • Edited by tlsdbwjd98 Thursday, February 13, 2020 12:52 AM
    Thursday, February 13, 2020 12:45 AM

All replies

  • Hi tlsdbwjd98,

    Could you please try:

    declare @aaa varchar(13) = '12345678';
    declare @bbb varchar(17) = 'N';
    declare @ccc varchar(10) = '112FAC1';
    declare @ddd varchar(10) = null;
    declare @eee varchar(10) = null;
    declare @RES_COD varchar(1) = null;
    declare @RES_NAM varchar(2000) = null;
    
    EXECUTE ('begin sorter_ord_info_mng.tml_rcv_his_prc(?,?,?,?,?); END;’
    , @aaa, @bbb, @ccc, @REC_COD OUTPUT, @REC_NAM OUTPUT) AT HDDDEV
    

    In addition, please make sure that the procedure sorter_ord_info_mng.tml_rcv_his_prc exists in Oracle.

    Here is a similar thread which might help.

    Best Regards,

    Amelia


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 14, 2020 6:32 AM