Sybase Partner

Ensure Database Availability

Database replications services will ensure availability of your business critical applications and information. Our expert consulting services take the complexity out of this most challenging area of database administration.

Home > Platforms > Sybase > Sybase Replication Tips

Sybase Replication Server Tips

1. Is my Replication Server up and running?

Try logging in using “isql” or do a process listing on OS-level such as a ps command on Unix.  Make sure the RSSD database is available as well.

2. Status Check Commands

“admin who_is_down” Displays the threads that are not running.
“admin health” Displays status information.  Status is HEALTHY when all threads are running, otherwise SUSPECT.
“admin logical_status” Displays status of logical connections of Warm Standby or MSA
“admin disk_space” Displays the state and amount of used space for disk partitions
“admin who, sqm” Displays status information about all queues
“admin who, sqt” Displays status information about the transactions of each queue
“admin who, dist” Displays information about DIST thread
“admin who, dsi” Displays information about each DSI scheduler thread running in the Replication Server
“admin show_connections” Displays information about all connections from the Replication Server to data servers and to other Replication Servers

 

3. Troubleshooting Sybase Replication Server

Replication Server Thread is down

Issue the command “admin who_is_down” on the Replication Server to capture information about threads that are not running.  Execute “resume” command and check error log to see whether it is resumed or came down again with the error message.  The command “sysadmin log_first_tran” writes the first transaction in a Data Server Interface (DSI) queue to the exceptions log.  Log on to RSSD and issue “rs_helpexception #, v” to view the details.  Once you identify why the thread is down, you will have to take action to resolve the situation to resume the thread.

Stable Queue size is increasing

You’d like to install a monitoring tool on your system to capture queue size that is presented in the command “admin who, sqm.”  The column “First Seg.Block” shows the first undeleted segment and block number in the queue. If the figures for First Seg.Block and Last Seg.Block do not match, data remains in the queue for processing.  Use the command “sysadmin dump_queue” to see about inbound and outbound stable queues.   There are options such as zap command or purge queue.  Use caution in using those commands cause it may put the replication system in jeopardy and lead to loss of replicated transactions.

PDB and RDB unsynchronized

Use the utility “rs_subcmp” to compare a subscription's tables in the primary and replicate databases to make sure the tables are the same.  It can also be used to reconcile the data in the replicate and primary tables. 

When there’s handful of tables to match, you can re-materialize them.  The fastest way is to use “no materialization” method.  You can make a copy of the primary data such as bcp and load it to the replicate.  Use caution when using “Atomic Materialization” as it holds lock on the primary table.  Also, make sure there’s enough space on the log and stable device.

All thread is up but it does not replicate

Make sure the primary data is marked for replication.  Use sp_setreptable, sp_setrepproc or sp_reptostandby commands.  Check and make sure the maintenance user has privilege to update replicate database.  There are cases that the SQL contains “set replication off” that disables replication.  It could also take a while for uncommitted transaction to be replicated.  Issue “select * from syslogshold” on the primary dataserver to identify those transactions.  Also make sure there’s no custom actions created to ignore some statements.

Stable Device is full

It's always good to check whether the stable devices have filled up; it's never too early to know. Use the the command “admin disk_space” to see if the stable devices have filled.  You can also configure “sqm_warning_thr1” percentage.  Default is 75.

4.  Installing Heterogeneous Replication

Replication from Sybase ASE to Non-Sybase requiresa DirectConnect. DirectConnect servers translate Sybase T-SQL and TDS into a format the third-party replicate database can understand. You can follow these steps to install.

Step 1. Install DirectConnect
Step 2. Configure DirectConnect
Step 3. Create a connection from RS to the heterogeneous database
Step 4. Create replication definition
Step 5. Create subscription
Step 6. Resume DSI thread to enable active replication

It is a very high-level view of heterogeneous data replication from Sybase ASE to non-Sybase platform. Please contact us for any detailed information.

Contact us with any questions.

 

Copyright © 2008-2010 Xtivia, Inc. All rights reserved.