Warm Standby Setup Instructions - SybaseWiki
Warm Standby Setup Instructions - SybaseWiki
Warm Standby Setup Instructions - SybaseWiki
Sybase Replication Server allows you to create and maintain a warm standby environment. The creation can be done with, for instance, the rs_init utility
or Sybase Central. In some cases extra flexibility is needed and this can best be achieved when command line statements are used.
For various other
reasons people prefer using this method.
This page describes the steps to be taken to create a warm standby environment through a combination of commands given to ASE and Replication
Server. It should be considered as a kind of worksheet. Feel free to make changes to suit your individual need. This might be needed when you are
dealing with a database with big table(s) holding text or image datatypes or you want to optimize performance using replication definitions and
subscriptions.
Contents
1 Assumptions of the environment
2 Preparation of the Sybase ASE-servers
3 Preparation of the Replication Server
4 Configure the RepAgent
5 Mark the database for replication and grant permissions
6 Configure the replication server for the standby database
The setup is divided into a number of steps, where each step is a separate unit of work.
The maintenance user is used by the replication server to apply transactions. Make sure that the name and password of the maintenance user on both
servers are identical. For practical reasons make the maintenance user aliased to "dbo" in the database. Since a dump-load scenario is used to materialize
the standby database, make sure that the suid of the maintenance user on both servers are identical.
sp_addlogin "<maintenance_user>","<maintenance_user_password>"
go
go
select suser_id("<maintenance_user>")
go
use <database>
go
sp_addalias "<maintenance_user>","dbo"
go
To do this, make a copy of the script rs_install_primary.sql located in the $SYBASE/$SYBASE_REP/scripts directory. Comment out 2 commands of the
script: the dbcc settrunc and the sp_setreplicate commands. These can be found at the end of the file, or just above the definition of the
rs_send_repserver_cmd stored procedure.
The commands that are skipped will be executed at a later stage, when the replication agent is configured. Apply the script on the active server in the
right database.
The name of it does not have to match with the name of the primary database server and database, but this convention is widely used.
www.petersap.nl/SybaseWiki/index.php/Warm_Standby_setup_instructions 2/5
26/9/21 11:05 Warm Standby setup instructions - SybaseWiki
This login is used by the rep-agent running in the ASE to connect to the replication server.
go
go
use <database>
go
go
go
sp_setreplicate rs_marker,"true"
go
sp_setreplicate rs_update_lastcommit,"true"
go
sp_start_rep_agent "<database>"
go
www.petersap.nl/SybaseWiki/index.php/Warm_Standby_setup_instructions 3/5
26/9/21 11:05 Warm Standby setup instructions - SybaseWiki
use <database>
go
go
sp_reptostandby "<database>","all"
go
Dump the database on the active server so it can be loaded into the standby server
go
go
www.petersap.nl/SybaseWiki/index.php/Warm_Standby_setup_instructions 4/5
26/9/21 11:05 Warm Standby setup instructions - SybaseWiki
Start the connection from the replication server to the standby database
Category: RepServer
If you have found the information on the SybaseWiki useful, please make a Bitcoin donation to 17xHcvGZ65FS3kpDUe6cTsWJKjQQDzWT8g
to support the site.
www.petersap.nl/SybaseWiki/index.php/Warm_Standby_setup_instructions 5/5