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.
| 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?ThanksAlpesh" |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-01-16 : 12:12:01
|
| bcp out create table bcp indtssql-dmoshould all do itsql-dmo is probably betssee www.nigelrivett.comDMO 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. |
 |
|
|
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! |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-01-16 : 13:51:12
|
| Hi alpeshThis 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 |
 |
|
|
|
|
|