Discussion:
how to find out replication definitions w/o subscriptions...
(too old to reply)
unknown
2008-01-12 15:32:00 UTC
Permalink
Hi All,

I want to clean my replication environment. How to findout
definitions that are not having any subscriptions.

Thanks in advance
K
Manish Negandhi
2008-01-12 16:16:25 UTC
Permalink
Post by unknown
Hi All,
I want to clean my replication environment.  How to findout
definitions that are not having any subscriptions.
Thanks in advance
K
Execute the following query in RSSD database and replace $servername
and $dbname with actual values of your replication setup.If you have
multiple databases from multiple servers replicating to 1 database you
can include servername2 and dbname2 in the below query.

select objname, phys_tablename,rd.dbname
from rs_objects ro, rs_databases rd
where
ro.dbid=rd.dbid and
rd.dsname in ("$servername1") and
rd.dbname in ("$dbname1")and
ro.objname not like "rs_%"
and ro.objid not in (
select objid from rs_subscriptions)
order by rd.dbname,ro.objname


-HTH
Manish Negandhi
[TeamSybase Intern]
Mark A. Parsons
2008-01-12 21:28:13 UTC
Permalink
I'd look at the source code for rs_helprep which is capable of displaying a) all repdef's or b) a repdef and all related
subscriptions in the current repserver. From this you should be able to write your own code to check all repdef's for
assocaited subscriptions (within the current repserver).

Caveats:

1 - if you have multiple repservers (eg, connected via routes) then you'll want to compare your findings across all
repservers; for example, a repdef may be defined in RS1 but the associated subscription may be defined in RS2 ('course,
the repdef should also be accessible/viewable from within RS2's RSSD) ... so you'd want to make sure you don't remove
the repdef from RS1 if it's still in use by a subscription in RS2

2 - in a WS/MSA setup you could have repdef's but no subscriptions; in this type of configuration the repdef's are
usually there as a means of improving replication performance; removing said repdef's (because there is no subscription)
could lead to a degradation in repserver performance
Post by unknown
Hi All,
I want to clean my replication environment. How to findout
definitions that are not having any subscriptions.
Thanks in advance
K
Loading...