I often face a question: how to find out Prim, Repl. ASE's
when provided repl. server name.
I get rssd name and server by: admin rssd_name.
Then i browse rs_subscriptions and rs_repobjs and by their
respective dbid's get close idea.
It works well when rep server have few replicated db's. But
I still not sure which db objects are replicated from which
Do you know more accurate / short way to quickly find out
what replicating where.
Subject: How to find out quickly Prim. and repl. servers
X-Mailer: WebNews to Mail Gateway v1.1t
Date: 14 Oct 2011 14:25:11 -0700
X-Trace: forums-1-dub 1318627511 10.22.241.41 (14 Oct 2011 14:25:11 -0700)
X-Original-Trace: 14 Oct 2011 14:25:11 -0700, 10.22.241.41
Xref: forums-1-dub sybase.public.rep-server:9078
Article PK: 870241
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
Subject: Re: How to find out quickly Prim. and repl. servers
Content-Type: multipart/mixed; boundary="------------020404020801050101010503"
Date: 14 Oct 2011 16:12:19 -0700
X-Trace: forums-1-dub 1318633939 10.22.241.152 (14 Oct 2011 16:12:19 -0700)
X-Original-Trace: 14 Oct 2011 16:12:19 -0700, vip152.sybase.com
Xref: forums-1-dub sybase.public.rep-server:9079
Article PK: 870240
I'm not aware of any 'easy' way to track individual objects through a replication environment.
Your best bet is to find the RSSD procs that provide you some (all?) of the info you want, grab the source code for said
procs, reverse engineer the stored proc logic, and write your own code.
To get at object level details you'll need to consider several potential twists ...
- table (and proc) level replication should be somewhat straight forward
- warm standby won't list individual tables/procs so you'll need to look for the source and target databases
- MSA doesn't have to list any individual tables/procs so you'll have to start by looking for source and target
databases, then take into consideration potential inclusion/exclusion lists for individual tables/procs
- publications (and the associated subscriptions) will require drilling down into the associated articles to find
- subscriptions created from warm standby logical connections will require yet more coding as you're now looking at
digging down through 2 levels of info
I've attached a SQL script I use to find sources and targets at the database level. The script was derived from RSSD
stored procs and the RSSD ER diagram.
NOTE: I don't think this one handles subscriptions hanging off of a logical connection (I remember coding that at one
point but can't seem to find that copy of the query at the moment).
Between the source code for the RSSD procs and the attached you should be able to write some queries to generate the
info you're looking for.