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 where prsid in sub_select order by primary_key |
rs_classes |
select * from rs_classes where prsid in sub_select order by primary_keys |
rs_columns |
select * from rs_columns where prsid in sub_select and rowtype = 1 order by primary_keys |
rs_databases |
select * from rs_databases where prsid in sub_select and rowtype = 1 order by primary_keys |
rs_erroractions |
select * from rs_erroractions where prsid in sub_select order by primary_keys |
rs_funcstrings |
select * from rs_funcstrings where prsid in sub_select and rowtype = 1 order by primary_keys |
rs_functions |
select * from rs_functions where prsid in sub_select and rowtype = 1 order by primary_keys |
rs_objects |
select * from rs_objects where prsid in sub_select and rowtype = 1 order by primary_keys |
rs_publications |
select * from rs_publications where prsid in sub_select order by primary_key |
rs_systext |
select * from rs_systext where prsid in sub_select and texttype in ('O', 'S') order by primary_keys |
rs_whereclauses |
select * from rs_whereclauses where prsid in sub_select order by primary_key |
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.