| Author |
Topic |
|
REEPER
Yak Posting Veteran
53 Posts |
Posted - 2007-01-19 : 15:33:04
|
| How can I copy data from 1 database to another on an entirely differant machine. Here is what I have so far:INSERT INTO TOPS_BOM_MASTER MaterialNo, Plant, MaterialGroup, UoM, MaterialDescription, CommisionGroup, SalesOrg, GroupDescription)tmpSql.Append("SELECT MaterialNo, Plant, MaterialGroup, UoM, MaterialDescription, CommisionGroup, SalesOrg, GroupDescriptionFROM de1.DE1.dbo.TOPS_BOM_MASTERThe database being copied to is: whisql2k.WHWSMaster.dbo.TOPS_BOM_MASTERMCP, MCSD |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-19 : 15:36:43
|
| You would need to add a linked server to de1. Then you can use the four part naming convention to get to it:INSERT INTO whisql2k.WHWSMaster.dbo.TOPS_BOM_MASTER MaterialNo, Plant, MaterialGroup, UoM, MaterialDescription, CommisionGroup, SalesOrg, GroupDescription)tmpSql.Append("SELECT MaterialNo, Plant, MaterialGroup, UoM, MaterialDescription, CommisionGroup, SalesOrg, GroupDescriptionFROM TOPS_BOM_MASTERYou could also add a linked server to whisql2k and do this as well:INSERT INTO TOPS_BOM_MASTER MaterialNo, Plant, MaterialGroup, UoM, MaterialDescription, CommisionGroup, SalesOrg, GroupDescription)tmpSql.Append("SELECT MaterialNo, Plant, MaterialGroup, UoM, MaterialDescription, CommisionGroup, SalesOrg, GroupDescriptionFROM DE1.dbo.TOPS_BOM_MASTERTara Kizer |
 |
|
|
REEPER
Yak Posting Veteran
53 Posts |
Posted - 2007-01-19 : 15:40:12
|
| how do you add a linked server?MCP, MCSD |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-19 : 15:41:19
|
| Please read up on linked servers in SQL Server Books Online. It is well documented in there.Tara Kizer |
 |
|
|
REEPER
Yak Posting Veteran
53 Posts |
Posted - 2007-01-19 : 15:49:44
|
| I found it in my SQL Sever Management tool - in the tree for adding linked servers - I'll give it a try.MCP, MCSD |
 |
|
|
REEPER
Yak Posting Veteran
53 Posts |
Posted - 2007-01-19 : 16:33:40
|
| that worked good - thx!MCP, MCSD |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|