vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I'm working with two databases on to physicaly separated servers: #1 is on a local machine en I can only connect to #2 via an ADSL connection. I need to syncrhonise the data. This works fine via the wizard from the Enterprise Manager. But I want to get this done via a script form the Query Analyzer that I can run whenever I want to. Something like: insert into srv1.database.dbo.table1 select * from srv2.database.dbo.table1 When I do this I get an error about "linked servers". That surprises me, because I have no linked servers configured and yet the wizard works fine? Can anyone tell me how to accomplish this? tav Jan Willems |
| ||||
| jhmwillems@hotmail.com (Jan) wrote in message news:<240176c1.0404060206.4bfaaca3@posting.google. com>... > Hi, > > I'm working with two databases on to physicaly separated servers: #1 > is on a local machine en I can only connect to #2 via an ADSL > connection. > I need to syncrhonise the data. This works fine via the wizard from > the Enterprise Manager. But I want to get this done via a script form > the Query Analyzer that I can run whenever I want to. Something like: > > insert into srv1.database.dbo.table1 > select * from srv2.database.dbo.table1 > > When I do this I get an error about "linked servers". That surprises > me, because I have no linked servers configured and yet the wizard > works fine? > > Can anyone tell me how to accomplish this? > > tav > Jan Willems The Import/Export Data wizard uses a separate connection to each server, so linked servers are not involved. The INSERT statement above does require the linked servers to exist, however. So you could just create the linked servers you need, or if that's not possible for some reason, then you can save a DTS package from the wizard, and execute it in whatever way is most convenient: http://www.sqldts.com/default.aspx?104 Simon |