http://goo.gl/EmKxy0

Home > ASE > Warm Standby Setup without rs_init utlity

Warm Standby Setup without rs_init utlity

Active Dataserver : PROD_ASE_DS1

Standby Dataserver : PRDO_ASE_DS2

Replication Server : PROD_REP1

Database : odb

Create Active and Standby Database with same name and logical devices and segments
===============================================================================================

[sybase@localhost ~]$ isql -Usa -SPROD_ASE_DS1 -w999
Password:
1> disk init name=’odb_data’,physname=’/home/sybase/SQL/data/odb_data_ds1.dat’,size=’10M’
2> go
1>
disk init name=’odb_log’,physname=’/home/sybase/SQL/data/odb_log_ds1.dat’,size=’5M’2>
3> go
1> create database odb on odb_data=’10M’ log on odb_log=’5M’
2> go
CREATE DATABASE: allocating 5120 logical pages (10.0 megabytes) on disk ‘odb_data’ (5120 logical pages requested).
CREATE DATABASE: allocating 2560 logical pages (5.0 megabytes) on disk ‘odb_log’ (2560 logical pages requested).
Database ‘odb’ is now online.
1> exit

[sybase@localhost home]$ isql -Usa -SPRDO_ASE_DS2 -w999
Password:
1> disk init name=’odb_data’,physname=’/home/sybase/SQL/data/odb_data_ds2.dat’,size=’10M’
2> go
1> disk init name=’odb_log’,physname=’/home/sybase/SQL/data/odb_log_ds2.dat’,size=’5M’
2> go
1> create database odb on odb_data=’10M’ log on odb_log=’5M’
2> go
CREATE DATABASE: allocating 5120 logical pages (10.0 megabytes) on disk ‘odb_data’ (5120 logical pages requested).
CREATE DATABASE: allocating 2560 logical pages (5.0 megabytes) on disk ‘odb_log’ (2560 logical pages requested).
Database ‘odb’ is now online.

Manually sync the logins and create the maint user in Both ASE. Make sure maint user having same suid across both servers:
==========================================================================================================================

sybase@localhost logs]$ isql -Usa -SPROD_ASE_DS1 -w999
Password:
1> sp_addlogin ‘odb_maint’,’odb_maint_ps’,’odb’
2> go
Password correctly set.
Account unlocked.
New login created.
(return status = 0)
1> use odb
2> go
1> sp_addalias odb_maint,’dbo’
2> go
Alias user added.
(return status = 0)
1> select suser_id(‘odb_maint’)
2> go

———–
7

(1 row affected)

[sybase@localhost logs]$ isql -Usa -SPRDO_ASE_DS2 -w999
Password:
1> use odb
2> go
1> sp_addalias ‘odb_maint’,’dbo’
2> go
Alias user added.
(return status = 0)
1> select suser_id(‘odb_maint’)
2>
3> go

———–
7

(1 row affected)

Install the SQL script for the installation of Replication sps and tables:
==========================================================================

[sybase@localhost scripts]$ isql -Usa -SPROD_ASE_DS1 -irs_install_primary.sql -ors_install_primary.sql.out -w999 -Dodb
Password:

Create the logical connection in RS:

[sybase@localhost scripts]$ isql -Usa -SPROD_REP1 -w9999

Password:
1> create logical connection to LDS.ldb
2> go
Logical connection to ‘LDS.ldb’ is created.

Create the Physical connection to Active database
=================================================

1> create connection to PROD_ASE_DS1.odb
2> set error class to rs_sqlserver_error_class
3> set function string class to rs_sqlserver_function_class
4> set username to odb_maint
5> set password to odb_maint_ps
6> with log transfer on
7> as active for LDS.ldb
8>
9> go
Active connection to ‘PROD_ASE_DS1.odb’ is created.

Create Rep agent user and grant the connect source permission.
===============================================================

1> create user odb_rep set password odb_rep_ps
2> go
User ‘odb_rep’ is created.
1> grant connect source to odb_rep
2> go
Permission granted to user ‘odb_rep’.

Configure the rep agent is active side and start it.
=====================================================

[sybase@localhost scripts]$ isql -Usa -SPROD_ASE_DS1 -w999
Password:
1> use odb
2> go
1> sp_config_rep_agent “odb”, “enable”, “PROD_REP1”, “odb_rep”, “odb_rep_ps”
2> go
Replication Agent enabled for database ‘odb’. The Replication Agent thread needs to be started using sp_start_rep_agent.
(return status = 0)
1> sp_config_rep_agent “odb”, “send warm standby xacts”, true
2> go
Parameter_Name Default_Value Config_Value Run_Value
———————————————- ————————– ———————— ——————
send warm standby xacts false true true

(1 row affected)
Replication Agent configuration changed for database ‘odb’. The changes will take effect the next time the Replication Agent thread is started.
(return status = 0)
1> sp_start_rep_agent “odb”
2> go
Replication Agent thread is started for database ‘odb’.
(return status = 0)
1> sp_help_rep_agent ‘odb’,’process’
2> go
Replication Agent Process status
dbname spid sleep_status state retry_count last_error
———— ——– ———————— —————- ———————- ——————–
odb 32 end of log sleeping 0 0
(return status = 0)

Mark the database for replication
====================================

1> use odb
2> go
1> sp_reptostandby ‘odb’,’all’
2> go
The replication status for database ‘odb’ has been set to ‘ALL’.
(return status = 0)

Now create the physical connection the standby , with dump marker method
========================================================================

1> create connection to PRDO_ASE_DS2.odb
2> set error class to rs_sqlserver_error_class
3> set function string class to rs_sqlserver_function_class
4> set username to odb_maint
5> set password to odb_maint_ps
6> with log transfer on
7> as standby for LDS.ldb
8> use dump marker
9> go
Standby connection to ‘PRDO_ASE_DS2.odb’ is created.

Dump the database at active side and load. online at standby side.
==================================================================

dump database odb to “/tmp/odb.dmp”

load database odb to “/tmp/odb.dmp”

online database odb

Resume the thread for standby side.

1> admin who_is_down
2> go
Spid Name State Info
——– ——————– —————————————- ——————————————————————————–
DSI EXEC Suspended 111(1) PRDO_ASE_DS2.odb
DSI Suspended 111 PRDO_ASE_DS2.odb

Resume connection to Replication Server
=======================================

resume connection to PRDO_ASE_DS2.odb

Check the Sybase Wiki @ sybasewiki.com
Categories: ASE Tags:
  1. No comments yet.
  1. No trackbacks yet.