Click here to Skip to main content
15,887,822 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to copy data of one table from one server to another server using sql script..
As i want to make a sproc for daily run,bcz i dont want to go through the right click import/export functinality.

Plz help me.

Thanks.
Posted

1 solution

You could use bcp:

http://msdn.microsoft.com/en-us/library/aa337544%28v=sql.105%29.aspx[^]

It looks like it can be used with T-SQL, so you could easily integrate this into a stored procedure. From glancing at the documentation you would bulk export into a data file and bulk import the contents of the data file to the other server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900