Add the standby database. The example procedure for configuring warm standby uses a dump of the active database to load the standby database and starts replication after the setup is complete.
Parameter | Description | Value |
---|---|---|
sybinit.release_directory | Specifies the valid path of the Replication Server software ($SYBASE). | /opt/software |
rs.rs_name | Specifies the name of the Replication Server | PRS |
rs.rs_rs_sa_user | Specifies the user ID that has “sa” privileges on Replication Server. | sa |
rs.rs_rs_sa_pass | Specifies the password of the “sa” user. | password Note: Leave blank if you
have a null password.
|
rs.rs_ds_name | The name of the data server that hosts the standby database. | wingak1505i |
rs.rs_ds_sa_user | Specifies the user ID that has “sa” privileges on data server. | sa |
rs.rs_ds_sa_password | Specifies the password of the “sa” user for the data server. | password Note: Leave blank if you
have a null password.
|
rs.rs_db_name | Specifies the name of the standby database | pubs2 |
rs.rs_needs_repagent | Specifies whether you plan to replicate from specified standby database. | yes |
rs.rs_db_maint_user | Specifies the user ID that performs insert, update, delete, and truncate table commands to the replicate database. The user ID must have permissions to perform DML commands at the replicate database. The user is called maintenance user. | The maintenance user (rs.rs_db_maint_user) that was defined for the active database. Using the same user for the active and standby database simplifies synchronizing the server user IDs after the database dump is loaded to the standby server. |
rs.rs_db_maint_password | Specifies the password for the maintenance user. | The password for the user specified rs.rs_db_maint_user |
rs.rs_db_physical_for_logical | Specifies whether this is a warm standby database. | yes |
rs.rs_db_active_or_standby | Specifies whether the configuration is for active or standby database. | standby |
rs.rs_db_logical_ds_name | Specifies the data server portion of the logical connection name. | pubs2a |
rs.rs_db_logical_db_name | Specifies the database portion of the logical connection name. | pubs2s |
rs.rs_db_active_ds_name | Specifies the server that hosts the standby database. | sunak1505i |
rs.rs_db_active_db_name | Specifies the name of the active database. | pubs2 |
rs.rs_db_active_sa | Specifies the user ID that has “sa” privileges on the active database. | sa |
rs.rs_db_active_sa_pw | Specifies the password of the “sa” user. | password |
rs.rs_init_by_dump | Specifies that the standby database is initialized using a dump of the active database. | yes |
rs.rs_db_use_dmp_marker | Specifies that “dump marker” option is used to notify replication when to begin forwarding transactions to the standby database. | yes |
./rs_init -r ../init/rs/mystandby.rs
If the rs_init command fails, correct the issue, then disable the RepAgent as follows:
Re-run rs_init command
isql -Usa -P -SPRS
admin who
go
The output generated from admin who is similar to
Spid Name State Info
------ ------- ------------ -----------------
36 DIST Awaiting Wakeup 102 pubs2a.pubs2s
37 SQT Awaiting Wakeup 102:1 DIST
pubs2a.pubs2s
31 SQM Awaiting Message 102:1 pubs2a.pubs2s
30 SQM Awaiting Message 102:0 pubs2a.pubs2s
27 DSI EXEC Awaiting Command 101(1)
sunak1505i.PRS_RSSD
20 DSI Awaiting Message 101
sunak1505i.PRS_RSSD
26 SQM Awaiting Message 101:0
sunak1505i.PRS_RSSD
49 DSI EXEC Awaiting Command 103(1)
sunak1505i.pubs2
35 DSI Awaiting Message 103 sunak1505i.pubs2
38 REP AGENT Awaiting Command sunak1505i.pubs2
39 NRM Awaiting Message sunask1505i.pubs2
DSI EXEC Suspended 104(1)wingak1505i.pubs2
DSI Suspended 104 wingak1505i.pubs2
21 dSUB Sleeping
15 dCM Awaiting Message
18 dAIO Awaiting Message
23 dREC Sleeping dREC
29 USER Awaiting Command sa
55 USER Active sa
14 dALARM Awaiting Wakeup
24 dSYSAM Sleeping
admin logical_status go
The output generated from admin logical_status is similar to:
Logical Connection Name | Active Connection Name | Active Conn State | Standby Connection Name | Standby Conn State |
---|---|---|---|---|
[102] pubs2a.pubs2s | [103] sunak1505i.pubs2 | Active/ | [104] wingak1505i.pubs2 | Suspended /Waiting for Enable Marker |
Controller RS | Operation in Progress | State of Operation in Progress | Spid | |
[16777317] PRS | None | None |