Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2016
    Posts
    17

    Answered: DB2 Replication issue

    Hi All,

    Before I begin, I'd like to mention that I am entirely new with IBM DB2 and I have little experience with it. I have to setup a DR site for a process server DB and I'm in the middle of doing a PoC.

    Hardware/Software
    TTest (Source)
    - Windows 7 Ultimate (Basically a VM on the same server)
    - IBM DB2 v9.7

    Test (Target)
    - Windows Server 2008 R2 Standard
    - IBM DB2 v9.7

    Issue

    I'm trying to follow this tutorial.

    1) Within Control Center on Test (Windows Server 2008), I connected to Windows Seven Server (I aliased the DB here as TTest) so it would be catalogued and I would be able to use it in Replication Center.
    2) In Replication Center (on Win 7 Machine), I created my Capture Control Tables on TTest and my Apply Control Tables on Test (accepting all defaults except where noted in the DB2 tutorial mentioned above).
    3) I registered the a table (Table1) on the Capture Control Server and created a subscription (TEST_TARGET) on my Apply Control Server
    4) Since I was using Replication Center on the Target (Test), using the asnpwd utility, I created a .aut file for both on Test and placed it in the repl directory as mentioned in the tutorial (C:Program Files\ibm\SQLLIB\repl\)
    5) Started the Capture program on TTest server using the command
    Code:
    C:\Program Files\IBM\SQLLIB\BIN>ASNCAP CAPTURE_SERVER=TEST CAPTURE_SCHEMA=ASN CA
    PTURE_PATH="C:\DB2" startmode=COLD
    6) Now when I try to start the Apply activity on TEST I get these errors:

    Code:
    C:\Program Files\IBM\SQLLIB\BIN>asnapply CONTROL_SERVER=TEST APPLY_QUAL=QUAL APPLY_PATH="c:\Program Files\ibm\SQLLIB\repl"
    
    2016-12-15-00.58.18.996000 ASN0600I  "Apply" : "" : "Initial" : Program "apply 9.7.8" is starting.
    2016-12-15-00.58.21.248000 ASN1045I  APPLY "QUAL" : "Initial" : The Apply version "9.7.8" program was started using database "TEST".
    2016-12-15-01.03.21.406000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "SELECT/VALUES". The table name is "asnsqlcd.SQC". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASNDD180". The SQLERRP is "SQLRA138".
    2016-12-15-01.03.21.593000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.08.21.769000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "SELECT/VALUES". The table name is "asndb2sq.SQC". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-01.18.22.666000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.23.22.889000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-01.23.23.045000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.28.23.267000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-01.28.23.423000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.33.23.630000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-01.33.23.802000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.38.23.977000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-01.38.24.133000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.43.24.340000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-01.43.24.496000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.48.24.688000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". 
    2016-12-15-01.53.25.238000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-01.58.25.476000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-01.58.25.647000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-02.03.25.854000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-02.03.26.057000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    2016-12-15-02.08.26.264000 ASN0552E  "Apply" : "QUAL" : "WorkerThread" : The program encountered an SQL error. The server name is "". The SQL request is "FETCHONE". The table name is "SYSIBM.SYSCOLUMNS". The SQLCODE is "-551". The SQLSTATEis "42501". The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASN2Q180". The SQLERRP is "SQLRA138".
    2016-12-15-02.08.26.482000 ASN1001E  APPLY "QUAL" : "WorkerThread". The Apply program encountered an SQL error. The ERRCODE is "0A0101". The SQLSTATE is "51002". The SQLCODE is "-805". The SQLERRM is "NULLID.ASNAM180 0X41534E4150504C59". The SQLERRP is "SQLRA147". The server name is "". The table name is "SYSIBM.SYSDUMMY1".
    I have tried to look on internet but I have little knowledge about these things so I can't troubleshoot it my self. Any idea what's wrong with it?

    Thanks in advance.

  2. Best Answer
    Posted by DNance

    "Some quick reading on the topic would tell you the layout of the error message

    2016-12-15-01.03.21.406000 ASN0552E "Apply" : "QUAL" : "WorkerThread" :
    The program encountered an SQL error. The server name is "".
    The SQL request is "SELECT/VALUES". The table name is "asnsqlcd.SQC".
    The SQLCODE is "-551". The SQLSTATEis "42501".
    The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASNDD180".
    The SQLERRP is "SQLRA138".

    From your error message, there is the table name and the userid from the first message in bold type. Looks like db2admin, doesn't have appropriate authority on your TTEST system."


  3. #2
    Join Date
    Oct 2007
    Posts
    161
    Provided Answers: 9
    -551 is authorization error. and -805 is bind error. Seems your binds are failing because you do not have select authority on the ID being used.

  4. #3
    Join Date
    Dec 2016
    Posts
    17
    Quote Originally Posted by DNance View Post
    -551 is authorization error. and -805 is bind error. Seems your binds are failing because you do not have select authority on the ID being used.
    Can you please elaborate, what ID? I'm sorry like I said I'm very new to these things. And how do I debug this?

  5. #4
    Join Date
    Oct 2007
    Posts
    161
    Provided Answers: 9
    Some quick reading on the topic would tell you the layout of the error message

    2016-12-15-01.03.21.406000 ASN0552E "Apply" : "QUAL" : "WorkerThread" :
    The program encountered an SQL error. The server name is "".
    The SQL request is "SELECT/VALUES". The table name is "asnsqlcd.SQC".
    The SQLCODE is "-551". The SQLSTATEis "42501".
    The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASNDD180".
    The SQLERRP is "SQLRA138".

    From your error message, there is the table name and the userid from the first message in bold type. Looks like db2admin, doesn't have appropriate authority on your TTEST system.

  6. #5
    Join Date
    Dec 2016
    Posts
    17
    Quote Originally Posted by DNance View Post
    Some quick reading on the topic would tell you the layout of the error message

    2016-12-15-01.03.21.406000 ASN0552E "Apply" : "QUAL" : "WorkerThread" :
    The program encountered an SQL error. The server name is "".
    The SQL request is "SELECT/VALUES". The table name is "asnsqlcd.SQC".
    The SQLCODE is "-551". The SQLSTATEis "42501".
    The SQLERRMC is "DB2ADMIN˙EXECUTE˙NULLID.ASNDD180".
    The SQLERRP is "SQLRA138".

    From your error message, there is the table name and the userid from the first message in bold type. Looks like db2admin, doesn't have appropriate authority on your TTEST system.
    Thanks, that has resolved my issue. Could you please also tell me is it possible to have the same table name in the target DB as in the source? Like TABLE1(TTest) -> TABLE1(TEST) instead of TGTABLE1? If yes, how. I looked everywhere but there's no option to change the target table names.

Posting Permissions

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