Showing posts with label seperate. Show all posts
Showing posts with label seperate. Show all posts

Friday, March 23, 2012

ODBC connection to a seperate machine

I'm curious, can you set up a ODBC connection on one server, that points
to another computer on the network where the database is? I've tried
the computer name as //server2, but it doesn't seem to find it, yet, I
can get to it via the RDC within WinXP Pro.
Thanks,
Steve"Steve Grosz" <boise_bound@.hotmail.com> wrote in message
news:eZknx$7UEHA.2520@.TK2MSFTNGP10.phx.gbl...
> I'm curious, can you set up a ODBC connection on one server, that points
> to another computer on the network where the database is? I've tried
> the computer name as //server2, but it doesn't seem to find it, yet, I
> can get to it via the RDC within WinXP Pro.
I do not believe that is allowed as which security credentials would be used
from the ODBC connection from server1 to server2? There are work-arounds,
for example you could use a linked server from SQL Server (say on server1)
and access the database on server2 from server1.
Stevesql

ODBC connection to a seperate machine

I'm curious, can you set up a ODBC connection on one server, that points
to another computer on the network where the database is? I've tried
the computer name as //server2, but it doesn't seem to find it, yet, I
can get to it via the RDC within WinXP Pro.
Thanks,
Steve
"Steve Grosz" <boise_bound@.hotmail.com> wrote in message
news:eZknx$7UEHA.2520@.TK2MSFTNGP10.phx.gbl...
> I'm curious, can you set up a ODBC connection on one server, that points
> to another computer on the network where the database is? I've tried
> the computer name as //server2, but it doesn't seem to find it, yet, I
> can get to it via the RDC within WinXP Pro.
I do not believe that is allowed as which security credentials would be used
from the ODBC connection from server1 to server2? There are work-arounds,
for example you could use a linked server from SQL Server (say on server1)
and access the database on server2 from server1.
Steve

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.