Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2003
    Posts
    7

    Unanswered: How not to perform full refresh copy by Apply?

    Hi,
    I have set up replication between 2 tables(TAB_S & TAB_T) that contain data. The Apply program performs full refresh copy at first start. I want to replicate the data of TAB_S to TAB_T and not delete the data of TAB_T. Is it possible not to do this?

    I had test :
    1)set the disable_refresh column to 1 in the IBMSNAP_REGISTER table
    2)With Capture running and Apply off, run this SQL statement:
    UPDATE ASN.IBMSNAP_PRUNCNTL SET SYNCHPOINT = x'00000000000000000000', SYNCHTIME = CURRENT TIMESTAMP WHERE apply_qual = 'QUALXX' and set_name = 'SETNAMEXX'.

    But the result is not what I need.

    Best regards

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    Please give more info about version of db2 you have, operating system name and version, etc.

    Please also read the Must Read before posting for more tips how to write efficient question.

    Hope this helps,
    Grofaty

  3. #3
    Join Date
    Nov 2002
    Location
    Rio de Janeiro - Brazil
    Posts
    78

    Re: How not to perform full refresh copy by Apply?

    As Grofaty said, more information would be really helpful.
    Anyway
    About the Full refresh of tables:
    The first time you start the apply program (notice, the first time after the creation of the Subscription Set), there will always be a full refresh to guarantee the integrity of the replication ( i.e., the mirroring of data).

    After the first time, you can choose not to take a full refresh copy. Donīt change the contents of the Control Tables unless you know exactly whatīs being done, this may cause internal problems for the replication. Instead, when starting the Capture program, state the parameter WARM, like this:

    asnccp <DATABASE> WARM

    this will cause the capture program to warm start.. like this there wonīt be full-refreshes (besides the first one which is always done) if there are no problems. With this parameter, the capture records a reference of the last read log sequence number. When the capture is re-started, log reading will restart from the last LSN recorded at the control tables.

    If you donīt specify this parameter, the capture will be started using itīs default, Cold Start, causing the replication to take a full-refresh of the subscription set. Once you started the cold started the capture, the records of the logs are lost, so a full-refresh of the table will be taken even when warm-starting the set.

    Take a look at the Replication Guide and Reference for more information about the Capture and Apply program and their parameters.

    HTH
    Fernando

    Originally posted by SYMBOL
    Hi,
    I have set up replication between 2 tables(TAB_S & TAB_T) that contain data. The Apply program performs full refresh copy at first start. I want to replicate the data of TAB_S to TAB_T and not delete the data of TAB_T. Is it possible not to do this?

    I had test :
    1)set the disable_refresh column to 1 in the IBMSNAP_REGISTER table
    2)With Capture running and Apply off, run this SQL statement:
    UPDATE ASN.IBMSNAP_PRUNCNTL SET SYNCHPOINT = x'00000000000000000000', SYNCHTIME = CURRENT TIMESTAMP WHERE apply_qual = 'QUALXX' and set_name = 'SETNAMEXX'.

    But the result is not what I need.

    Best regards

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: How not to perform full refresh copy by Apply?

    This is the procedure I follow :

    1) Stop Capture and Apply programs
    2) Copy the source data to target
    3) Disable Refresh (ibmsnap_register's disable_refresh column set to 1)
    4) Start Capture in Cold Mode
    5) Update prune control table and subscription set table
    Prune Control : As per your SQL
    Subs Set :
    Update asn.ibmsnap_subs_set
    SETLastRun = Current TimeStamp,LastSuccess = Current TimeStamp,SynchPoint = NULL,Status = 0,Activate = 1 WHEREApply_Qual = <apply_qual>AND Set_Name = <set_name>

    6) Start Apply

    Step 5 should get capture start capturing the changes to the source tables ... This can be verified using the GOCAPT message for every source table in asn.ibmsnap_trace table on the source ...

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Aug 2003
    Posts
    7
    I am sorry. I am a jackeroo.

    DB2 V7.1 + Fix9 OS Window2000Server
    I have set up replication between 2 tables(TAB_S & TAB_T) that contain data. The Apply program performs full refresh copy at first start. I want to replicate the data of TAB_S to TAB_T and not delete the data of TAB_T. Is it possible not to do this?

    I had test :
    1)set the disable_refresh column to 1 in the IBMSNAP_REGISTER table
    2)With Capture running and Apply off, run this SQL statement:
    UPDATE ASN.IBMSNAP_PRUNCNTL SET SYNCHPOINT = x'00000000000000000000', SYNCHTIME = CURRENT TIMESTAMP WHERE apply_qual = 'QUALXX' and set_name = 'SETNAMEXX'.

    But the result is not what I need.

    To sathyaram_s
    Because I have hundreds of tables,it imposible "Copy the source data to target" manually. Is there other way?

    Best regards

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    If you want the source and the target in sync, but you are worried about the refresh filling up the logs or taking a long time, ASNLOAD coule be an option ... Never had a chance to use the ASNLOAD userexit ... So not sure how it works ... But you can give it a try ...

    If you want the changes on the source to be copied from the current point and not worried about existing data, you can skip step 2 (copy data from source to target) ...

    HTH

    Cheers
    Sathyaram

    Originally posted by SYMBOL
    I am sorry. I am a jackeroo.

    DB2 V7.1 + Fix9 OS Window2000Server
    I have set up replication between 2 tables(TAB_S & TAB_T) that contain data. The Apply program performs full refresh copy at first start. I want to replicate the data of TAB_S to TAB_T and not delete the data of TAB_T. Is it possible not to do this?

    I had test :
    1)set the disable_refresh column to 1 in the IBMSNAP_REGISTER table
    2)With Capture running and Apply off, run this SQL statement:
    UPDATE ASN.IBMSNAP_PRUNCNTL SET SYNCHPOINT = x'00000000000000000000', SYNCHTIME = CURRENT TIMESTAMP WHERE apply_qual = 'QUALXX' and set_name = 'SETNAMEXX'.

    But the result is not what I need.

    To sathyaram_s
    Because I have hundreds of tables,it imposible "Copy the source data to target" manually. Is there other way?

    Best regards
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    In step 2 , didn't you also update the subscription set table ?



    I had test :
    1)set the disable_refresh column to 1 in the IBMSNAP_REGISTER table
    2)With Capture running and Apply off, run this SQL statement:
    UPDATE ASN.IBMSNAP_PRUNCNTL SET SYNCHPOINT = x'00000000000000000000', SYNCHTIME = CURRENT TIMESTAMP WHERE apply_qual = 'QUALXX' and set_name = 'SETNAMEXX'.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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