Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    99

    Unanswered: How to call stored procedure from SQL replication

    Hi,

    I thought this would be pretty straight-forward but I can't seem to figure out how to call a stored procedure from SQL replication - Statements. I simply open Replication Center go to the Statements tab and add Procedure.

    I am running DB2 AESE 9.7 fp8 on Linux RE 5.3

    I tried 2 flavors of procedures - takes one variable as input and another that takes none. In both cases I am adjusting the procedure call in Replication Center.

    i.e.
    SP_TEST(ID)
    or
    SP_TEST()

    I keep getting the error below.

    2013-04-08-10.24.47.825743-240 I18795A1241 LEVEL: Warning
    PID : 28316 TID : 17560523174368PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : HFA_CONV
    APPHDL : 0-42955 APPID: *LOCAL.db2inst1.130408142448
    AUTHID : DB2INST1
    EDUID : 691 EDUNAME: db2agent (DHFA_CON) 0
    FUNCTION: DB2 UDB, trace services, sqlt_logerr_data (secondary logging func, probe:0
    MESSAGE : sqlerCallDL: prepare of uncat procedure failed!
    DATA #1 : Hexdump, 136 bytes
    0x000000010353BE68 : 5351 4C43 4120 2020 0000 0088 FFFF FF98 SQLCA ........
    0x000000010353BE78 : 0019 29FF 4341 4C4C 2053 505F 5445 5354 ..).CALL SP_TEST
    0x000000010353BE88 : 2869 64FF 3C73 7061 6365 3E20 2020 2020 (id.<space>
    0x000000010353BE98 : 2020 2020 2020 2020 2020 2020 2020 2020
    0x000000010353BEA8 : 2020 2020 2020 2020 2020 2020 2020 2020
    0x000000010353BEB8 : 2020 2020 2020 2020 5351 4C4E 5030 3146 SQLNP01F
    0x000000010353BEC8 : 801A 006D 0000 0000 0000 0000 0000 0000 ...m............
    0x000000010353BED8 : FFFF FD3F 0000 0000 2020 2020 2020 2020 ...?....
    0x000000010353BEE8 : 2020 2020 2020 2020

  2. #2
    Join Date
    Nov 2010
    Posts
    99
    Okay some headway. I am able to call the procedure that takes 0 arguments by removing the parentheses sp_test() becomes sp_test.

    So my question now is how to call a procedure that takes arguments
    i.e.
    SP_TEST(id)

    thanks in advance,

    -j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •