Kevin6


I have something similar...

On a SQL 2005 default instance on a box named 'machine1', I define a linked server which points to a SQL 2000 instance also located on 'machine1'. In SSMS, I right-click to use 'add linked server' to add 'machine1\sql2000' (taking the SQL Server radio button as the default). The definition works fine.

I then try to use the linked server in a four-part name, e.g. 'select * from machine1\sql2000.dbname.dbo.foobar'

and I get a syntax error complaining abou the backslash. No amount of quotes seems to help.

What's the trick for defining a linked server in a SQL 2005 instance where the linked server is a named SQL 2000 instance on the same machine and then using that linked server of the SQL 2000 instance in a T-SQL query

thx




Re: Linked server SQL 2005 to 2000

Arnie Rowland


Moved to Setup and Upgrade forum...







Re: Linked server SQL 2005 to 2000

Arnie Rowland

You have a couple of options.

Either 'wrap' the server/instance name in square brackets, e.g.,

SELECT

Col1,

Col2,

etc

FROM [machine1\sql2000].dbname.dbo.foobar

or, Create an Alias for the linked servername.