Monday, March 12, 2012

Need Query For 'Enforce relationship fo replication'

Hi,
I am dealing with merge replication.
In enterprise manager --> design --> relationship - there is an option
'Enforce relationship for replication'.
Is it possible to identify the status (whether checked/unchecked) of this
option for a particular table through query? I need to identify this for all
the tables in the database.
Please advise
Thanks,
Soura
Soura,
I keep a list of this type of query at
http://www.replicationanswers.com/Scripts.asp. For your needs, I think this
should be it...
select table_name, constraint_name from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where constraint_type = 'foreign key'
and objectproperty(object_id(constraint_name),'CnstIsN otRepl') = 0
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thank you Paul its working fine.
Thanks,
Soura
"Paul Ibison" wrote:

> Soura,
> I keep a list of this type of query at
> http://www.replicationanswers.com/Scripts.asp. For your needs, I think this
> should be it...
> select table_name, constraint_name from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
> where constraint_type = 'foreign key'
> and objectproperty(object_id(constraint_name),'CnstIsN otRepl') = 0
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
>

No comments:

Post a Comment