April 3, 2008 at 1:59 pm
I'm finding this group to be a GREAT resource, so rather than plunk around in help for a bit...
I need to copy a table from a SQL Server 2000 DB that I connect to via VPN to a SQL Server 2005 DB on my local machine. This is so I can put topgether a CLR function or two, run it on the 2005 DB table, and then put it back into the 2000 DB table, since 2000 won't run CLR functions.
So, how do I do this copying back and forth with the greatest of ease? TIA for your help...
Brad
April 3, 2008 at 2:26 pm
what about:
bcp out to a file
zip the file (if big)
ftp/copy the file/zip
unzip the file (if necessary)
bcp in from file
if the table has identity columns or computed fields, you'll need a format file.
April 3, 2008 at 2:34 pm
BCP?
April 3, 2008 at 2:42 pm
look for BCP in your SQL Server documentation. it's made for moving data in/out of SQL Server.
from the operating system command line, the basic syntax is like so:
bcp source_database..source_table out my_datafile -c -S source_server -U my_login -P my_password
then
bcp target_database..target_table in my_datafile -c -S target_server -U my_login -P my_password
bcp won't create the table when importing. you'll have to get the table's ddl from the source server and create it on the target server.
April 3, 2008 at 2:47 pm
Ok, cool...I will give that a look and a shot. Thanks!
Brad
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply