Re: Constraints: disable / enable constraints issue
From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 10/27/04
- Previous message: Mark Wilden: "Re: Constraints: disable / enable constraints issue"
- In reply to: Leida: "Constraints: disable / enable constraints issue"
- Next in thread: Gert-Jan Strik: "Re: Constraints: disable / enable constraints issue"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 27 Oct 2004 13:47:10 -0700
Hi Leida
Foreign keys can be disabled using the ALTER TABLE command. Please see Books
Online for full syntax, or have Enterprise Manager script the operation to
show you the syntax to use.
Primary Keys cannot be disabled since they are supported by a unique index.
A unique index always must be maintained, so the only way to not enforce the
Primary Key is to drop the index, which means dropping the constraint.
-- HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com "Leida" <Leida@discussions.microsoft.com> wrote in message news:AD81D4EF-060C-41FA-82D0-A223EB41BD9A@microsoft.com... > Isn't there a way, other then Enterprise Manager, to disable and / or > enable > constraints, in particular primary and foreign keys? I am migrating data > daily from one system to SQL and to disable and enable manually is > inconvenient and combersome. I looked through BOL and cannot find a direct > answer on how to create a process to automatically disable and / or enable > constraints. Thanks.
- Previous message: Mark Wilden: "Re: Constraints: disable / enable constraints issue"
- In reply to: Leida: "Constraints: disable / enable constraints issue"
- Next in thread: Gert-Jan Strik: "Re: Constraints: disable / enable constraints issue"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|