Quantcast
Channel: SCN: Message List - SAP Replication Server
Viewing all articles
Browse latest Browse all 876

bi-directional replication, resync databases

$
0
0

Hello,

 

We have the following setup to replicate between dataservers srv_a and srv_b  (using repservers rep_a and rep_b) :

 

-) replication : srv_a   <--->   rep_a  <--->   rep_b   <----> srv_b

 

-) bidirectional-replication using msa : having database replication definitions and database subscriptions on both sites (i.e. in both directions)

 

-) used as active/passive system with srv_b being the active server.

 

srv_a is ASE 12.5.4 (solaris sparc/2K pages), srv_b is ASE 15.7 (solaris intel/4K pages).

 

I want to upgrade srv_a to ASE 15.7.

 

Here is what I did :

 

-) create a new 15.7 server, define the databases, load a dump of srv_b into it, disabled the replication agents.

-) drop database subscriptions in both directions.

-) stop srv_a, rename and restart the new sever iwth name srv_a.

for each database :

-) create a database subscription from b to a using dump marker

-) dump database on srv_b and load on srv_a.

the dump contains the replication configuration of srv_b, so this has to be changed in the settings of srv_a :

-) sp_config_rep_agent $db, 'connect dataserver', 'srv_a'

-) sp_config_rep_agent $db, 'rs servername', 'rep_a'

-) dbcc settrunc('ltm', 'ignore')

-) dbcc settrunc('ltm', 'valid')

-) dbcc settrunc('ltm', 'end')

and in rssd_db of rep_a :

-) rs_zeroltm srv_a, $db

-) then start the repagent, and resume the connection.

 

-) finally, create a database subscription from a to b.

 

 

The result is that replication from b to a is working fine (which is good because that's from active to passive),

but replication from a to b isn't.

 

I used sysadmin dump_queue to see what 's in the stable queue, and it seems that transactions on srv_a don't make it to the stable queue.

 

When reading the documentation, I came across the description of generation numbers.

Normally it's increased to avoid that after restoring a primary database, transactions are considered

to be duplicates.

The Duplicates column in the output of admin who, sqm is increasing.

 

Since I couldn't find what was causing the problem, I thought of giving setting the generation number a try, and added :

-) dbcc settrunc('ltm', 'gen_id', 1)

after the settrunc('ltm', 'ignore') command in the description above.

 

When I did that, replication from srv_a to srv_b started to work.

 

I don't understand why this is happening, and why transactions are considered as duplicates.

I also want to avoid increasing the generation number, is there a solution without doing this ?

 

Thanks,

Luc.


Viewing all articles
Browse latest Browse all 876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>