|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Sunday, April 21, 2013 10:57 PM
Points: 535,
Visits: 1,423
|
|
Jeff Moden (3/4/2013) In that case, you might try what SQL Server itself uses for replication if you have the disk space. BCP in native format. Export the table to a file, then import it in half million (or less depending on the size of your rows) row chunks using the batch size setting. It will keep your log file from exploding.
As an alternative, you could have the infrastructure folks do what I believe is called a "SAN Snapshot" to copy the mdf and ldf files and then simply attach the database.
As jeff sugested , taking a SAN snapshot and then attaching the mdf / ldf file could save time and will be a good approach.
"More Green More Oxygen !! Plant a tree today"
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 03, 2013 8:54 AM
Points: 113,
Visits: 890
|
|
I have some recommends here: 1-Choose the point time when your server does not work hard 2-Separate your table into smaller pieces (may be multiple files) and using a package to transform data
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, March 13, 2013 7:27 AM
Points: 194,
Visits: 632
|
|
| Did you try Import/export option of SQL when server is not too busy?
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, March 06, 2013 8:23 AM
Points: 12,
Visits: 34
|
|
Hi,
We decided to insert the info using
BEGIN TRANSACTION
INSERT INTO DB2.dbo.Table SELECT * FROM DB1.dbo.Table WHERE CodigoCaso < @cont and CodigoCaso > @ultimo SET @ultimo = @cont SET @cont = @cont + 1000
COMMIT TRANSACTION
In order to avoid a huge increase in the log file.
I will post the result
Thanks
|
|
|
|