When executing rs_subcmp on replicated RSSD tables during RSSD recovery procedures, formulate the where and order by clauses of the select statement to select all rows that must be replicated for each system table.
Table 7-4 illustrates the general form of these select statements.
You may need to adjust these select statements in a mixed-version environment.
RSSD table name |
select statement |
---|---|
rs_articles |
select * from rs_articles,rs_objects where rs_objects.prsid in sub_select and rs_articles.objid = rsobjects.objid order by articleid |
rs_classes |
select * from rs_classes where prsid in sub_select order by classid |
rs_columns |
select * from rs_columns where prsid in sub_select and rowtype = 1 order by objid, basecolnum, colname, colnum, version |
rs_databases |
select * from rs_databases where prsid in sub_select and rowtype = 1 order by dbid, dbname, dsname, ldbid, ltype, ptype |
rs_erroractions |
select * from rs_erroractions where prsid in sub_select order by ds_errorid, errorclassid |
rs_funcstrings |
select * from rs_funcstrings where prsid in sub_select and rowtype = 1 order by fstringid |
rs_functions |
select * from rs_functions where prsid in sub_select and rowtype = 1 order by funcid, funcname, objid |
rs_objects |
select * from rs_objects where prsid in sub_select and rowtype = 1 order by active_inbound, dbid, has_baserepdef, objid, objname, objtype, phys_tablename, phys_objowner, version |
rs_publications |
select * from rs_publications where prsid in sub_select order by pubid |
rs_systext |
select * from rs_systext where prsid in sub_select and texttype in ('O', 'S') order by parentid, texttype, sequence |
rs_whereclauses |
select * from rs_whereclauses,rs_articles,rs_objects where rs_objects.prsid in sub_select and rs_articles.objid = rsobjects.objid and rs_whereclauses.articleid = rs_artilces.articleid order by wclauseid |
In the select statements in Table 7-4, sub_select represents the following sub-selection statement, which selects all site IDs that are the source Replication Servers for the current Replication Server:
(select source_rsid from rs_routes where (through_rsid = PRS_site_ID or through_rsid = RRS_site_ID) and dest_rsid = RRS_site_ID)
where PRS_site_ID is the site ID of the Replication Server managing the primary RSSD, and RRS_site_ID is the site ID of the Replication Server managing the replicate RSSD for the rs_subcmp operation.
For the rs_columns, rs_databases, rs_funcstrings, rs_functions, and rs_objects system tables, if rowtype = 1, then the row is a replicated row. Only replicated rows need be compared using rs_subcmp.
For each system table, the primary_keys are its unique indexes. See Chapter 8, “Replication Server System Tables” in the Replication Server Reference Manual for more information on the tables.