Sybase - Replication - Dumping Queue Data



Notes:
This procedure is useful in tracking data from a primary database to a replicate database. Steps 4 through 5 can also be used in dumping the contents of a queue, that has corrupt data, that is causing the replication server to crash (Procedure on this coming soon).
Definitions:


  1. Run the following commands on the Replicate RepServer for all databases
    suspend connection to DataServer.DBName
    go
  2. Run the following commands on the Primary RepServer
    trace 'on',sqm, sqm_trace_commands
    go
    trace 'on',sqm, sqm_trace_writes
    go
    trace 'on',sqt, sqt_trace_commands
    go
  3. Log into Primary DataServer and insert a row into a replicated table.
  4. Run the following command on the Replicate RepServer
    admin who,sqm
    go
    You will need the data from the "Info" column
    dbID:Direction DataServer.DBName
    You will also need the following data from the "First Seg.Block" column
    FirstSegInt.FirstSegBlock
  5. Run the following command on the Replicate RepServer using the data gathered above:
    sysadmin dump_queue, dbID, Direction, FirstSegInt, FirstSegBlock, BlocksToDump [, client]
    go
    Where BlocksToDump is a numeric number, indecating how many blocks to dump.
  6. Run the following commands on the Replicat RepServer to see the data as it is sent to the Replicate Database
    trace "on", dsi, dsi_buf_dump
    go
  7. Resume connection to the replicate database that you are trouble shooting:
    resume connection to DataServer.DBName
    go
  8. Run "admin who,sqm" and verified that the data has caught up by comparing the "First Seg.Block" column to the "Last Seg.Block" column.
  9. Once data has caught up run the following command on the Replicat RepServer to turn of DSI tracing:
    trace "off", dsi, dsi_buf_dump
    go
  10. Run the following commands on the Primary RepServer
    trace 'off',sqm, sqm_trace_commands
    go
    trace 'off',sqm, sqm_trace_writes
    go
    trace 'off',sqt, sqt_trace_commands
    go
  11. View the RepServer LOG files for the "dsi_buf_dump" data, and if the "client" option was NOT used in the "dump_queue" command, then that data will be in the RepServer LOG file as well.


Author: Raymond M. A. Erdey


Hosted by www.Geocities.ws

1