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:
- DataServer - The name of the replicate Data Server.
- DBName - The name of the replicate database.
- Run the following commands on the Replicate RepServer for all databases
suspend connection to DataServer.DBName
go
- 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
- Log into Primary DataServer and insert a row into a replicated table.
- 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
- 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.
- 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
- Resume connection to the replicate database that you are trouble shooting:
resume connection to DataServer.DBName
go
- 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.
- 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
- 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
- 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