Alok Singh
Alok Singh

Reputation: 174

Finding Row and Column filters in transactional replication

SQL Server Transactional Replication:

I understand that T-Rep supports both row and column filters and this can be done through the GUI while setting up replication.

I am trying to create SQL code which can list down all the filters (row and column) for all the tables which replicate from publisher. This must be possible by querying the publisher DB.

Any help will be highly appreciated

Upvotes: 0

Views: 1539

Answers (2)

Fajar
Fajar

Reputation: 21

Thanks Am able to get the detail from Publisher Database

select * from sysarticles

artid creation_script del_cmd description dest_table filter filter_clause ins_cmd name objid pubid pre_creation_cmd status sync_objid type upd_cmd schema_option dest_owner ins_scripting_proc del_scripting_proc upd_scripting_proc custom_script fire_triggers_on_snapshot

select * from sysarticlecolumns

artid colid is_udt is_xml is_max

Upvotes: 0

Brandon Williams
Brandon Williams

Reputation: 3755

For row filters you can query sysarticles which contains a row for each article defined. This table is stored in the publication database and contains 2 columns, filter and filter_clause which can help you identify row filters.

For column filters you can query sysarticlecolumns which contains one row for each table column that is published and maps each column to its article. This table is stored in the publication database.

Upvotes: 2

Related Questions