Monday, March 19, 2012

Is it possible to "disable" all restrictions on a Ms sql DB?

In meen. primary keys, NOT NULL, IDENTETIES...et.c

I have to do a maunally, one time, building of a database. Sometables has to
stay an some are to be exchanged. The foreignkey inforcemnt ill do for my
self so everything is correct. I just need to be allowed to de thede task
for a while. Is it impossible?

Regards
Anders"Flare" <dct_flare@.hotmail.com> wrote in message news:<3f302ad3$0$24659$edfadb0f@.dread14.news.tele.dk>...
> In meen. primary keys, NOT NULL, IDENTETIES...et.c
> I have to do a maunally, one time, building of a database. Sometables has to
> stay an some are to be exchanged. The foreignkey inforcemnt ill do for my
> self so everything is correct. I just need to be allowed to de thede task
> for a while. Is it impossible?
> Regards
> Anders

You can disable foreign keys, check constraints and triggers with
ALTER TABLE. But you can't disable primary keys, NULL/NOT NULL is
(usually) part of the column definition, and IDENTITY is a column
property, so they can't be enabled/disabled in the same way.

It's not entirely clear from your comments what problems you're having
with the import, so if you can be more specific then perhaps someone
can help.

Simon

No comments:

Post a Comment