Subject | Re: Remote connections |
---|---|
Author | Adrian Pronk |
Post date | 2001-03-07T23:18:27Z |
A few days ago, Brad Pepers had problems connecting to Windows databases
from Linux ISQL. He later said that it was a VMWare issue. Today I had
the same problem. It wasn't a VMWare issue. Here are the steps I went
through to solve it:
into a host name. I guess this machine must know the address of
backpuserver.
Lets try accessing a database on my machine using an IP-address:
in web-browsers:
like the file name. Lets try a syntactically valid path name:
IP address:
x/tcp
being an invalid service. From this I infer that the second colon delimits
an optional tcp port similar to an http URL:
getservbyname(),
even though I specified a numeric port. Now I'll have to look up the
service
name in /etc/services and see if its there:
--
Adrian
from Linux ISQL. He later said that it was a VMWare issue. Today I had
the same problem. It wasn't a VMWare issue. Here are the steps I went
through to solve it:
>>> $ isql 192.168.1.1:/x:/Databases/XxxxxxCopyOfHost.gdbRight, so it can't connect, but it managed to translate the IP address
>>> Statement failed, SQLCODE = -902
>>>
>>> Unable to complete network request to host "backupserver".
>>> -Failed to locate host machine.
>>> -Undefined service x/tcp.
>>> Use CONNECT or CREATE DATABASE to specify a database
>>> SQL>
into a host name. I guess this machine must know the address of
backpuserver.
Lets try accessing a database on my machine using an IP-address:
>>> $ isql 127.0.0.1:/xxxxxx.gdbThat worked. Lets try replacing the ":" with "|" like you sometimes see
>>> Database: 127.0.0.1:/xxxxxx.gdb
>>> SQL>
in web-browsers:
>>> $ isql 192.168.1.1:/x\|/Databases/XxxxxxCopyOfHost.gdbThat looks like it's connecting to the machine successfully but doesn't
>>> Statement failed, SQLCODE = -902
>>>
>>> I/O error for file "/x|/Databases/XxxxxxCopyOfHost.gdb"
>>> Use CONNECT or CREATE DATABASE to specify a database
>>> SQL>
like the file name. Lets try a syntactically valid path name:
>>> $ isql 192.168.1.1:/x/Databases/XxxxxxCopyOfHost.gdbOk, file not found, as expected. Lets try a host name instead of an
>>> Statement failed, SQLCODE = -902
>>>
>>> I/O error for file "/x/Databases/XxxxxxCopyOfHost.gdb"
>>> -Error while trying to open file
>>> -The system cannot find the path specified.
>>>
>>> Use CONNECT or CREATE DATABASE to specify a database
>>> SQL>
IP address:
>>> $ isql backupserver:/x/Databases/XxxxxxCopyOfHost.gdbSame as above. Lets try the correct file path using a host name:
>>> Statement failed, SQLCODE = -902
>>>
>>> I/O error for file "/x/Databases/XxxxxxCopyOfHost.gdb"
>>> -Error while trying to open file
>>> -The system cannot find the path specified.
>>>
>>> Use CONNECT or CREATE DATABASE to specify a database
>>> SQL>
>>> $ isql backupserver:/x:/Databases/XxxxxxCopyOfHost.gdbHey! I didn't pay attention to this before, but it's complaining about
>>> Statement failed, SQLCODE = -902
>>>
>>> Unable to complete network request to host "backupserver".
>>> -Failed to locate host machine.
>>> -Undefined service x/tcp.
>>> Use CONNECT or CREATE DATABASE to specify a database
>>> SQL> quit;
x/tcp
being an invalid service. From this I infer that the second colon delimits
an optional tcp port similar to an http URL:
>>> $ isql backupserver:3050:x:/Databases/XxxxxxCopyOfHost.gdbName Services.
>>> Statement failed, SQLCODE = -902
>>>
>>> Unable to complete network request to host "3050".
>>> -Failed to locate host machine.
>>> -The specified name was not found in the hosts file or Domain
>>> Use CONNECT or CREATE DATABASE to specify a databaseOk, so it thinks the host is "3050". Maybe it needs a preceding slash...
>>> SQL> quit;
>>> $ isql backupserver:/3050:x:/Databases/XxxxxxCopyOfHost.gdbNow we're back to where we were. Hmmm, it seems to be calling
>>> Statement failed, SQLCODE = -902
>>>
>>> Unable to complete network request to host "backupserver".
>>> -Failed to locate host machine.
>>> -Undefined service 3050/tcp.
>>> Use CONNECT or CREATE DATABASE to specify a database
>>> SQL> quit;
getservbyname(),
even though I specified a numeric port. Now I'll have to look up the
service
name in /etc/services and see if its there:
>>> $ grep 3050 /etc/servicesFinally, lets try again with the service name:
>>> gds_db 3050/tcp # InterBase Database Remote Protocol
>>> $ isql backupserver:/gds_db:x:/Databases/XxxxxxCopyOfHost.gdbbackupserver:/gds_db:x:/Databases/XxxxxxCopyOfHost.gdb
>>> Database:
>>> SQL>Hey, it worked! I've never seen that syntax documented.
--
Adrian