Linking to Multiple Instance Server

  • I have linked to a SQL Server which is running as a multiple instance on a single computer. The server name is sqlserver\test. There is also a sqlserver2\dev enviroment. The problem is when I try to query a table from this database, I get a syntax error. The query is:

    select * from sqlserver2\test.db1.dbo.orders

    I've tried this against a server which is not a mutiple instance and the following query works fine:

    select * from sqlserver1.db1.dbo.orders

    Question: how do I format the query so that I can access data from a linked "multiple instance" server?

  • How about

    select * from [sqlserver2\test].db1.dbo.orders ?

  • When setting up a linked server the name you give it shoul match with what you put in the client network utility. For your example you can define a SQLSERVER1 as sqlserver\test and SQLSERVER2 as sqlserver2\dev. Then in your linked server you give it the name of SQLSERVER2 and that it is a SQL Server. Then you can do select * from sqlserver2.db1.dbo.orders. You determine the alias you want to give it that way.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • quote:


    How about

    select * from [sqlserver2\test].db1.dbo.orders ?


    This looked promising, but I ended up with SQL Server not found.

  • quote:


    When setting up a linked server the name you give it shoul match with what you put in the client network utility. For your example you can define a SQLSERVER1 as sqlserver\test and SQLSERVER2 as sqlserver2\dev. Then in your linked server you give it the name of SQLSERVER2 and that it is a SQL Server. Then you can do select * from sqlserver2.db1.dbo.orders. You determine the alias you want to give it that way.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)


    I successfully setup the Alias in the Client Network Utilities and I was able to register the server in the Enterprise Manager. But, when comes to linking the server, the link sets up okay, but can't be used. If I either try to run a query using "select * from sqlservertest.db1.dbo.table" or try to view tables from within the Enterprise Manager, I receive the same messsage, "Specified SQL Server not found."

    Mitch

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply