I have to copy the contents of a table (6million rows) into another table on
the same instance. The target table has an identity column(PK). What is the
fastest way to do this? The instance has to remain up for the web site, and
yes, the target table is read by the web site. I was thinking a bcp out/in.
Thanks,
MichaelUse SET IDENTITY_INSERT ON/OFF to keep the identity column. There's
also a switch in the bcp utility to keep identities (-E)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_set-set_7zas.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_bcp_61et.asp
Snake wrote:
> I have to copy the contents of a table (6million rows) into another table on
> the same instance. The target table has an identity column(PK). What is the
> fastest way to do this? The instance has to remain up for the web site, and
> yes, the target table is read by the web site. I was thinking a bcp out/in.
> Thanks,
> Michael
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment