Friday, February 24, 2012

Linked Server - Turn Off Constraints

I want to turn off constraints on all tables on a linked server using:
"SP_MSFOREACHTABLE 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'"
Should I make a connection to the linked server, and/or use OpenQuery to
pull this off?Derek,
That could very easily cause data integrity issues. Are you really sure you
want to do that?
HTH
Jerry
"Derek Hart" <derekmhart@.yahoo.com> wrote in message
news:OZ%235R8seGHA.4948@.TK2MSFTNGP04.phx.gbl...
>I want to turn off constraints on all tables on a linked server using:
> "SP_MSFOREACHTABLE 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'"
> Should I make a connection to the linked server, and/or use OpenQuery to
> pull this off?
>

No comments:

Post a Comment