Base de Conocimientos Técnicos

ODBC simply will not connect/see to DB Server even though it is running

Hint Ref: 021105190009
Hint Date: 19/05/2011

Hint Details:

ISSUE

 

A user was trying to connect from a workstation to a Space Manager Sybase Database server running on the same subnet.

SYMPTOMS

When testing the ODBC connection the error returned was 'Database server not found'. Even Sybase Central would not connect and the option to 'Find' servers on the Connection Window did not list the any database servers.

SOLUTION

The Database Server was found NOT to be using the default Port Number. Specifying the Port Number, in use by the Database Server, solved the connection issue.

REASON

By default, a Space Manager database service uses IP Port 2638. When 'Host=IP Address' is used as the Network ODBC setting, this port is used by default and does not need to need to be specified.

However, if a new database service is run, then as 2638 is in use, an alternative port number will be specified, and the basic 'Host=' parameter will not get a connection.

The port the secondary service is using will be displayed in the Sybase Server Message screen and a connection can be made by using the host setting of

Host=<IP address>;ServerPort=<Port Number>

However, to ensure that if the service is stopped and restarted, a different port is not assigned, the required port can be specified within the service configuration using the -x TCIP command:

-x TCPIP(ServerPort=<Port Number>) - note no spaces.
e.g. -x TCPIP(ServerPort=49152)

In this case an alternative ServerPort was specifed in the service configuration even though only one service existed.


(Please Note: This Procedure can be destructive and should only be used by Advanced Users.  RADical Systems (UK) Limited or its Partners cannot be held responsible, in anyway, for any consequence of using this or any other Database Function, Procedure or SQL command.  Responsibility resides solely with the user.  

IT IS HIGHLY RECOMMENDED THAT A FULL AND VALID SPACE MANAGER DATABASE BACKUP IS TAKEN AND VERIFIED AS VALID BEFORE MAKING ANY CHANGES TO THE DATABASE.)