Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Move table from db on Server 1 to another db on Server2

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-01-16 : 11:32:48
alpesh writes "Hi;

I have a TABLE in DB1 on SQL server called "1.1.1.1" I want to move that TABLE to DB2 on SQL server called "alpesh". How do I do it?

Thanks
Alpesh"

nr
SQLTeam MVY

12543 Posts

Posted - 2003-01-16 : 12:12:01
bcp out create table bcp in
dts
sql-dmo

should all do it
sql-dmo is probably bets
see
www.nigelrivett.com
DMO transfer

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

royv
Constraint Violating Yak Guru

455 Posts

Posted - 2003-01-16 : 12:23:19
You could also use linked servers between the 2 sql servers and write TSQL code to insert the table into DB2

***************************************
Death must absolutely come to enemies of the code!
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-01-16 : 13:51:12
Hi alpesh

This depends on two things:
1) Do you want to move only the table structure or the structure & data?
2) Are both the servers on the same network?

If both the servers are on the same network, the easiest way to do it is to use the import/export wizard. you'll find it under the tools menu in Enterprise Manager.
If not, then you need, generate the create script for the table from 1.1.1.1 and run it on alpesh. that should create the table structure. if you need to copy data, follow nr's suggestion and use bcp.

OS

Go to Top of Page
   

- Advertisement -