Sybase Replication: Table Level Replication flow details when Server/Database name is known
Sybase Replication #sybase replication, MSA, table level replication, warmstandbyMany a times while working on Sybase Replication environment, we come across scenarios where we have only Source Server/Database or Target Server/Database details and we want to find out it's corresponding replication flow details. We can use below query based on our requirement to get replication flow details in table level replication.
Case#1: If Target Server/Database details are known, then we can use below query to get Source Server/Database details in Table Level Replication.
select substring(d.dsname,1,20) "SRC_SRV",substring(d.dbname,1,15) "SRC_DB",substring(o.phys_tablename,1,30) "Table_Name",
substring(objname,1,30) "Rep_Def",substring(subname,1,30) "Subscription"
from rs_subscriptions s,rs_objects o, rs_databases d, rs_users u, rs_repdbs rd
where rd.dsname="<TGT_SRV>" and rd.dbname="<TGT_DB>"
and rd.dbid=s.dbid
and s.objid=o.objid
and o.dbid=d.dbid
and s.rownerid=u.uid
Sample Output:

Case#2: If Source Server/Database details are known, then we can use below query to get Target Server/Database details in Table Level Replication.
select substring(rd.dsname,1,20) "TGT_SRV",substring(rd.dbname,1,15) "TGT_DB",substring(o.phys_tablename,1,30) "Table_Name",
substring(objname,1,30) "Rep_Def",substring(subname,1,30) "Subscription"
from rs_subscriptions s,rs_objects o, rs_databases d, rs_users u, rs_repdbs rd
where d.dsname="<SRC_SRV>" and d.dbname="<SRC_DB>"
and rd.dbid=s.dbid
and s.objid=o.objid
and o.dbid=d.dbid
and s.rownerid=u.uid
Sample Output:

How useful was this post?
Click on a star to rate it!
Average rating 5 / 5. Vote count: 1
No votes so far! Be the first to rate this post.