Sunday, February 26, 2012

Enabling "not for replication" contraint on a mass level

HI,
sql server 2000,uni directional transaction replication with initial
snapshot . Can not be simpler than this.
My database has around 100 tables and ever time i setup replication, i have
to make sure that none of the referential integrity constraints are copied
over to the subscriber because they are not set for "not for replication".
And if i want to set it up , i might have to go to each and every table and
specify this contraint. My questions are
1. is there any way i can have all the referential integrity contraints on
the subscriber and still not have "not for replication" checked?
2. if the answer is NO , then is there any way , any script i could use to
mass update all the PKs\ FKs with "Not For Replication" constraint?
Thanks
Muzammil
AFAIK - there is no way of doing this - but why do you want to enforce DRI
on the subscriber? Normally the subscriber is read only.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sameer" <sameer@.discussions.microsoft.com> wrote in message
news:34ACBAE1-9F82-46CB-B844-B5B68F2B4798@.microsoft.com...
> HI,
> sql server 2000,uni directional transaction replication with initial
> snapshot . Can not be simpler than this.
> My database has around 100 tables and ever time i setup replication, i
have
> to make sure that none of the referential integrity constraints are copied
> over to the subscriber because they are not set for "not for replication".
> And if i want to set it up , i might have to go to each and every table
and
> specify this contraint. My questions are
> 1. is there any way i can have all the referential integrity contraints on
> the subscriber and still not have "not for replication" checked?
> 2. if the answer is NO , then is there any way , any script i could use to
> mass update all the PKs\ FKs with "Not For Replication" constraint?
> Thanks
> Muzammil
|||Hilary, thanks for you response.
Yes even though the subscriber is read only , but the client just can not
accept that the database does not have any referencial integrity contraints.
I still can not beleive that there is no way i could write down a script to
get every table from Sysobjects , find the referential integrity contraints
and append the "not for replication" contraints on them. Please suggest.
Thanks
Muzammil
"Hilary Cotter" wrote:

> AFAIK - there is no way of doing this - but why do you want to enforce DRI
> on the subscriber? Normally the subscriber is read only.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "sameer" <sameer@.discussions.microsoft.com> wrote in message
> news:34ACBAE1-9F82-46CB-B844-B5B68F2B4798@.microsoft.com...
> have
> and
>
>

No comments:

Post a Comment