fastest way to copy data from one database to another

Using sql server 2008 R2. I have two tables that I need to copy from one db to another. They contain 68 million and 44 million records each. What is the fastest way to copy those two table from source db to target db on the same server. I am using import export wizard, but it is taking too long.
patd1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Deepak ChauhanSQL Server DBACommented:
You can use BCp utility.

Open command prompt on server and run this command after replacing the correct DB name and table name on source server.

bcp databaseName.DBO.Table out D:\tableName.dat -T -c


Zip the file using winrar and copy the zip file to target server

unzip the file on target server
run this command on target server after replacing the DB name and table name

bcp databaseName.DBO.Table in D:\tableName.dat -T -c
patd1Author Commented:
How fast would it be? My load is 33% done in two hours. Is it worth stopping and restarting?

Thanks for your help.
Deepak ChauhanSQL Server DBACommented:
Download and upload in very fast but file copy is depend on network bandwidth.

if loading is runnign for one table, you can start this side by side for another table. else no benifit to cancel the 33% if this is for both table.
patd1Author Commented:
There is no need to copy file, so I tried to export one table to dat file, while the load is still on. I wanted to see how much time it would take to export, but it fails due to login error. How to pass credentials with windows authentication in the command?

Error: Login tiemout expired.
Deepak ChauhanSQL Server DBACommented:
Login timeout expired.

-T switch is for Trusted connection

-U<userName> and -P<password>  but fisrt try below

Seems you are using Named instance:

bcp databaseName.DBO.Table out D:\tableName.dat -T -c -S<servername\instancename>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.