Skip to Content

SQL Query to Retrieve Rep Subscription Where Clause

Hi All,

I’m wondering if someone already develop a simple query based in replication metadata to retrieve the subscription where clause string.

If yes do you mind to shared it 😀

i have a proc to do do this but looks me super complex  to adapt to a  normal sql query 



You must be Logged on to comment or reply to a post.
  • NOTE: You should probably post these types of questions as a ‘discussion’ (not as a ‘document’).

    There is no ‘simple’ query for reverse engineering a subscription ‘where’ clause.

    Your best bet is to look at the source code for rs_helpsub and rs_subddl (called by rs_helpsub).  These should contain all the logic for reverse engineering the DDL (including the ‘where’ clause) for a given sub.