Hardy (wyhang (AT) gmail (DOT) com) writes:
Quote:
suppose I have 100M records and we don't like INSERT.
one option is to export to external file and bulk load the file.
is there any better idea? linked server configured here. |
Since you mention linked server, I assume that the tables are not
only in different databases, but also linked servers? In that case
I would do BCP (since I don't know SSIS).
If they are on the same server, you should absolute use INSERT if you
are on SQL 2008, since INSERT can be minimally logged on SQL 2008,
provided this is true:
* Database is in simple or bulk-recovery.
* The table is a heap.
* You specify the TABLOCK hint.
Books Online has the full details.
--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx