Monday, February 20, 2012

Obscure linked server error

Hello,

I've got 2 SQL servers in a test environment - one is 2000 and the other is MSDE and they are seperate machines. I have added the MSDE server as a linked server to my 2000 box by issuing the following command:

EXEC sp_addlinkedserver '192.168.1.108', N'SQL Server'

I can query the database using an openquery in a select statement like so:

select * from openquery([192.168.1.108], 'select * from remote_test.dbo.products')

but when I try a direct query like the following:

select * from [192.168.1.108].remote_test.dbo.products

I get the following error:

An error occurred while executing batch. Error message is: Processing of results from SQL Server failed because of an invalid multipart name "192.168.1.108.remote_test.dbo.products", the current limit of "4" is insufficient.

I can't seem to figure out anything about this error. Anyone have any ideas?

Thanks,

Jeff Balcerzak

What about choosing another name than the IP ;-) ?

Jens K. Suessmeyer.

http://www.sqlserver2005.de
--|||That does work if I specify the server name on my local network. If the production server is not going to be in the local network, would I create an alias to it with the public IP address?|||What about using an entry in the lmhost file to the outside IP?

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||I actually added an entry in hosts file and created an alias to my public IP to test. I physically moved my test server to a different part of my network so it is not visible to the lan and created a port forward on my router to direct wan traffic on 1433 to the test server. Now when I execute the sp_addlinked server with the server name, it seems to work fine. Thanks for your help.

No comments:

Post a Comment