0

I have two servers and need to dump data from one to another. I have tried to use

[Server].[DB].[dbo].[Tablename] 

But I get red squigglies under the [Server] name.

I am running SQL Server 2012.

Thanks for any help.

2
  • 3
    Read about linked server Commented Dec 14, 2016 at 23:24
  • @JLyne That should work. Commented Dec 14, 2016 at 23:39

1 Answer 1

2

As @Shnugo mentioned, the only way to reference an object on a different SQL Server instance is to define that other SQL Server instance as a linked server on the instance where you’re running your query. Once you do that the red squiggly lines will disappear. Here is the MSDN article that explains how to add a linked server: https://msdn.microsoft.com/en-us/library/ff772782(v=sql.110).aspx

Also, since you are looking to transfer data from one server to the other you may want to consider using a third party tool like our xSQL Data Compare (http://www.xsql.com/products/sql_server_data_compare/) which is free for SQL Server Express. Even if your servers are not SQL Express you get 2 weeks to use the tool for free so you can get the job done.

PS I work for xSQL Software.

Sign up to request clarification or add additional context in comments.

5 Comments

meta.stackexchange.com/a/59302. I'd remove that self promotion / endorsement... not the way ya want to kick off your SO days
@scsimon - I don't think the promotion of third party software is a problem on SO since they have disclosed their association and provided an alternative solution. I could quite easily recommend Redgate's offerings even though I have no association with them.
@Tony although they did disclose affiliation it is frowned upon. In fact, questions seeking a third party tool is prohibited since answers involving them are opinion based thus against SO guidelines IMHO.
@scsimon but the question is not seeking a third party tool.
@Tony based on your argument third parties could search SO for key words like SQL data transfer and answer and also add their product as long as they disclose their affiliation. That is spam. This isn't what comments are for either and these should be deleted so I'm stopping now

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.