Home All Groups Group Topic Archive Search About

Linked Server - Turn Off Constraints

Author
18 May 2006 11:04 PM
Derek Hart
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?

Author
18 May 2006 11:56 PM
Jerry Spivey
Derek,

That could very easily cause data integrity issues.  Are you really sure you
want to do that?

HTH

Jerry
Show quote
"Derek Hart" <derekmh***@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?
>

AddThis Social Bookmark Button