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 |
|
prashanth_gs
Starting Member
1 Post |
Posted - 2005-11-07 : 06:31:39
|
| Hai,We have two databases and we need to transfer the tables from one database to another database.What are the ways to do the same.Is this command work out, if not pls provide the correct method... COPY from user/pwd@dba1 to user1/pwd@dba2 INSERT INTO TABLE2 USING SELECT * FROM TABLE1please help us...Thanx in advance,Prashant |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-07 : 06:37:07
|
| Use any one of the following1 Use DTS2 Use Import/Export option thru Enterprise Management3 Use queries like thisInsert into DB1.dbo.Table1(columns) Select columns from DB2.dbo.Table1MadhivananFailing to plan is Planning to fail |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2005-11-07 : 06:39:58
|
| For the data migration from one database to another database you can make use of DTS i.e Data Transformation Service.. or if you just want to transfer 1 or 2 tables then you can tryout the following query ..Using <DestinationDatabase>Select * Into <TableName> From <SourceDatabase>..<TableName>This query will create the table as the same structer and will migrate all the data from the sourcetable to the destination table But it will not create any indexes or primary key.. if there were any in the source table.Complicated things can be done by simple thinking |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|