Link to home
Create AccountLog in
Avatar of rwallacej
rwallacej

asked on

Copy data from remote database to local host

hi

I have data on a server and localhost. I want to copy data from remote server to local table. But there is issue when running

In SQL server management studio I have connected to both remote server and localhost

The table is called "tblPlanner"

Script I have to copy is

insert into dbo.tblPlanner (a,b,c)
Select a,b,c from
[myserver.mydomain.com].DatabaseName.dbo.tblPlanner

when I run this I get error "Login failed for user forename.surname"

Help please, thank-you
Avatar of rwallacej
rwallacej

ASKER

I should say I tried the SQL Import and Export wizard, this works but really would like it automated
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
The difference for SQL queries and SSMS/Copy DB Wizard is that the latter is executed at the client, while SQL is executed by the server.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
thanks for help