2017-06-25

Error when connecting from isql to Sybase

When you try to connect to Sybase / SAP ASE following error may be raised:

CT-LIBRARY error:
        ct_connect(): network packet layer: internal net library error: Protocol driver call to parse connection information failed"

All those issues are described in this online Sybase course, but if you are looking for the immediate help  continue reading,  what can be cause the error?

Environment may be not setup


For Sybase tools to work, the environment needs to be setup. This means that environmental variables needs to be present. To test if you have those variables may look like that:

echo $SYBASE

This should return a path to installation directory. If nothing is returned issue as sap user:

.  ./SYBASE.sh

(note the additional dot at the beginning). This will define all the settings and will cause that commands will know where and how to connect, so maybe your problem would be solved.

Server not running


This sounds crazy, but yes - this can be a reason! To test if the server is indeed running: log on as sap user, execute the 

.  ./SYBASE.sh

(see previous point for explanation) and next execute command:

showserver

This should return the process information about the dataserver process. If the result is empty than you need to start Sybase manually. You could also test presence of dataserver process using

ps -afe | grep dataserver

To start Sybase you can try to run 

/opt/sap/ASE-16_0/install/RUN_SAP01

The path and even the run file name can differ, depending on the installation choices.

INTERFACES file can be misconfigured


In the INTERFACES file each server name should be defined. There should be separate section for each server and you can have more than one server there for example separate entry for database server and separate for backup server and so on. 

Each section has usually two entries: master (used when the server is starting) and query (used by client, so also isql to connect to server).  The most important settings there are the network address for the server and the port number. 

Network binding problem


Some problem could be recorded when Sybase tried to bind to network interface. Take a look at the error log (on my server /opt/sap/ASE-16_0/install/SAP01.log). Normally there should be a line like:

kernel  network name 192.168.137.100, interface IPv4, address 192.168.137.100, type tcp, port 5000, filter NONE
kernel  Listener with protocol tcp, host 192.168.137.100, port 5000 started.

this line records successful binding. If you don't see such a line, there should be some error message instead. Having the error message you can continue with the investigation. I have seen a system, where just a restart solved the problem. 

If the server cannot be restarted take a look at sp_listener procedure - see  http://sap-database.blogspot.com/2017/06/error-ninit-bind-cannot-assign.html

Syntax error


The syntax for isql is:

isql -S -U -P

It is possible to make an error with it. Make sure the servername is like in the interfaces file

1 comment:

  1. This is actually good to read content of this blog. A is very general and huge knowledgeable platform has been known by this blog. I in reality appreciate this blog to have such kind of educational knowledge.
    Cisco SG300 POE

    ReplyDelete

SAP Adaprive Server Enterprise

SAP Adaprive Server Enterprise
SAP Adaprive Server Enterprise