Connecting via WISQL when your server_name is longer than 16 characters

By: Borland Staff

Abstract: You can workaround the problem by editing your hosts file

Problem:
I am unable to connect to my remote server.

Solution:
The InterBase Windows based tool WISQL.exe has
a bug in that the 'server' edit box for making
remote server connections has a string length
limit of 16 characters.

 Example:

  mywebserver.mydomainname.com

When submitted to connect to the remote server
this 'server name' will get truncated to 

  mywebserver.mydo

This will then cause the error:

 Statement failed, SQLCODE = -902
 Unable to complete network request 
  to host "mywebserver.mydo".
 -Failed to locate host machine.
 -The specified name was not found in 
  the hosts file or Domain Name Services.

 ---------------------------------------------

This bug is specific to the Windows GUI tool,
it does not exist if using the command line
tool 'ISQL.exe'.

 ---------------------------------------------

There is a workaround to this problem.  You
will need to make an edit to the 'HOSTS' file
on your Windows 95/NT systems.

This file can be found in the following locations:

  Windows NT:
  
	winntsystem32driversetchosts
 
  Windows 95:

  	windowshosts 

The hosts file is used to create a mapping 
between a machines 'host_name' and an IP address.

Example: (InterBase HOSTS file for a CLIENT)

 # HOSTS file example (InterBase Server No. 1)
 #
 # This file allows an InterBase Client resolve a
 # Server by its 'host_name' or 'IP' address.
 #
 # Format:
 #
 # IP address      hostname.domain    Description

 127.0.0.1         localhost          #Common to all TCP

 123.123.123.123   mywebserver
 123.123.123.123   AnyThingIwant

 ---------------------------------------------

Upon making an entry in the HOSTS file, save it.
You should not need to reboot or restart the TCP service.

Now you are set to work around the 'WISQL.exe' 
16 character server name bug limit.  Something
to note however.  At the time you make an entry
into this file and use the IP or hostname, it is
no longer a real IP or hostname but, rather a local
mapping to one.  This is why you are able to 
connect via an IP address with InterBase.  Without
the entries in this file InterBase would not be
able to resolve a server's location by IP address
alone because InterBase does all of its remote
server resolution via 'gethostbyname'.

Having made these changes you can now use the 
following entries in the 'remote server' box of
the 'WISQL.exe' database connection dialog.

For this example valid entries would be:

  123.123.123.123
  mywebserver
  AnyThingIWant

Remember! that the entries in the HOSTS file
cannot be longer than 16 characters as well.

Server Response from: ETNASC03