Re: DTS in SQL 2005 on tables with constraints
- From: Allan Mitchell <allan@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 19 Nov 2007 22:18:50 +0000 (UTC)
Hello Larry,
Why do you need to do a TRUNCATE? Can you not do incremental loads as truncating the table would suggest that you are completely reloading the tables.
--
Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com
Thanks for that Allan,
The problem is that the developers could have added / removed
constraints in between running the scripts and actually generating the
script to have the ALTER TABLEs to reinstate the constraints is a pain
on this many tables.
I was hoping there was a more intelligent dynamic way of temporarily
getting rid of the constraints while I run the import and then
reinstating them. I thought that EXEC sp_msforeachtable "ALTER TABLE
? NOCHECK CONSTRAINT all" might do the trick, but you can't TRUNCATE
the table unless you actually remove the constraints.
Any suggestions?
Larry.
.
- Follow-Ups:
- Re: DTS in SQL 2005 on tables with constraints
- From: Larry Neylon
- Re: DTS in SQL 2005 on tables with constraints
- References:
- Re: DTS in SQL 2005 on tables with constraints
- From: Larry Neylon
- Re: DTS in SQL 2005 on tables with constraints
- Prev by Date: Re: DTS in SQL 2005 on tables with constraints
- Next by Date: Re: DTS in SQL 2005 on tables with constraints
- Previous by thread: Re: DTS in SQL 2005 on tables with constraints
- Next by thread: Re: DTS in SQL 2005 on tables with constraints
- Index(es):
Relevant Pages
|
Loading