http://goo.gl/EmKxy0

Home > ASE, Installation, Replication Server, Sybase ASE/REP Interview Questions > Sybase Replication Setup using rs_init on Linux -3

Sybase Replication Setup using rs_init on Linux -3

4.Adding Primary and Replicate Database

a)Before Moving forward, We are setting up the replication between two databases which are in same server ie PROD_ASE.pdb is Primary database, PROD_ASE.rdb is Replicate Database.

b)Logged in PROD_ASE and create database as :
1> create database pdb on rep_db1_data=”10M” log on rep_db1_log=”5M”
2> go
00:00:00000:00013:2011/04/14 10:37:59.37 server Timestamp for database ‘pdb’ is (0x0000, 0x00001428).
CREATE DATABASE: allocating 5120 logical pages (10.0 megabytes) on disk
‘rep_db1_data’ (5120 logical pages requested).
CREATE DATABASE: allocating 2560 logical pages (5.0 megabytes) on disk
‘rep_db1_log’ (2560 logical pages requested).
Database ‘pdb’ is now online.
1> create database rdb on rep_db2_data=”10M” log on rep_db2_log=”5M”
2> go
00:00:00000:00013:2011/04/14 10:39:00.88 server Timestamp for database ‘rdb’ is (0x0000, 0x00001428).
CREATE DATABASE: allocating 5120 logical pages (10.0 megabytes) on disk
‘rep_db2_data’ (5120 logical pages requested).
CREATE DATABASE: allocating 2560 logical pages (5.0 megabytes) on disk
‘rep_db2_log’ (2560 logical pages requested).
Database ‘rdb’ is now online.

c) Enable the rep agent in PROD_ASE dataserver
1> sp_configure ‘rep_agent’,1
2> go

d) Adding the pdb and rdb in Replication Server System ,
pdb = Primary Database, rdb=Replicate Database
rs_init_pdb_rdb Log

e) admin who output before adding pdb/rdb
1> admin who
2> go
Spid Name State
Info
——– ——————– —————————————-
——————————————————————————–
13 DSI EXEC Awaiting Command 101(1) PROD_ASE.PROD_RS_RSSD
9 DSI Awaiting Message 101 PROD_ASE.PROD_RS_RSSD
8 SQM Awaiting Message 101:0 PROD_ASE.PROD_RS_RSSD
10 dSUB Sleeping
6 dCM Awaiting Message
7 dAIO Awaiting Message
11 dREC Sleeping dREC
14 USER Active sa
5 dALARM Awaiting Wakeup
12 dSYSAM Sleeping

1> admin rssd_name
2> go
RSSD Dataserver RSSD Database
—————- ————————
PROD_ASE PROD_RS_RSSD

admin who output after adding pdb/rdb

1> admin who
2> go
Spid Name State Info
——– ——————– —————————————- ——————————————————————————–
13 DSI EXEC Awaiting Command 101(1) PROD_ASE.PROD_RS_RSSD
9 DSI Awaiting Message 101 PROD_ASE.PROD_RS_RSSD
8 SQM Awaiting Message 101:0 PROD_ASE.PROD_RS_RSSD
25 DSI EXEC Awaiting Command 102(1) PROD_ASE.pdb
20 DSI Awaiting Message 102 PROD_ASE.pdb
22 DIST Awaiting Wakeup 102 PROD_ASE.pdb
23 SQT Awaiting Wakeup 102:1 DIST PROD_ASE.pdb
21 SQM Awaiting Message 102:1 PROD_ASE.pdb
19 SQM Awaiting Message 102:0 PROD_ASE.pdb
24 REP AGENT Awaiting Command PROD_ASE.pdb
37 DSI EXEC Awaiting Command 104(1) PROD_ASE.rdb
36 DSI Awaiting Message 104 PROD_ASE.rdb
35 SQM Awaiting Message 104:0 PROD_ASE.rdb
10 dSUB Sleeping
6 dCM Awaiting Message
7 dAIO Awaiting Message
11 dREC Sleeping dREC
39 USER Active sa
5 dALARM Awaiting Wakeup
12 dSYSAM Sleeping
1> admin rssd_name
2> go
RSSD Dataserver RSSD Database
—————- ————————
PROD_ASE PROD_RS_RSSD

Check the Sybase Wiki @ sybasewiki.com
  1. No comments yet.
  1. No trackbacks yet.