Multi Site Availiability setup
Most warm standby applications are used in a High Availability environment: when one server is down, the data should be available on a second server. When Multi Site Availability is used, replication can be performed to a third server. This server can then be used for e.g. a separate reporting environment. Below you will find the commands to create such an environment. Warning: it cannot be used when there is activity on the logical connection.
Contents
Create a maintenance user on the ASE
When you want to materialize the database with dump and load you have to make sure that the suid of the new login matches the suid of the maintenance user on the other servers.
sp_addlogin "<maintenance_user>","<maintenance_user_password>" go grant role replication_role to "<maintenance_user>" go -- check the value of the suid select suser_id("<maintenance_user>") go use <database> go sp_addalias "<maintenance_user>","dbo" go
Create a database replication definition
create database replication definition <rep_def> with primary at <active_server>.<database>
Prepare the database
Load the script rs_install_replicate located in the $SYBASE/$SYBASE_REP/scripts directory into the database.
Create a connection to the database
create connection to <server>.<database> set error class to rs_sqlserver_error_class set function string class to rs_sqlserver_function_class set username to <maintenance_user> set password to <maintenance_user_password>
Subscribe to the replication definition
When you create the subscription, the new database should be in sync (materialized) with the database on the logical connection.
create subscription <subscription_name> for database replication definition <rep_def> with primary at <active_server>.<database> with replicate at <server>.<database> without materialization
That's all.