In a production environment, it would be unusual to have more than one server running on the same system, and Sybase strongly recommends against doing this. In a development environment, however, this situation can occur.
If you run more than one server or client on the same UNIX machine, and shared memory is enabled, you must take certain precautions to prevent users from connecting to the wrong server.
When attempting to start a server, you may see the following message:
DBSPAWN ERROR -96 -- database engine already running
This error indicates that the startup process is finding the shared memory segment of a server started earlier, and is unable to create a shared memory segment. This error may occur when either an Sybase IQ or Adaptive Server Anywhere server is running. (Interactive SQL will also connect to an earlier server if its shared memory port is visible, even if you intended for it to connect to a server started later.) You can avoid the error if you run only one server per system, either Sybase IQ or Adaptive Server Anywhere.
To avoid conflicts when using shared memory, consider doing one or more of the following:
Create a temporary directory dedicated to each server. Make sure that each client uses the same temporary directory as its server by setting the ASTMP environment variable explicitly on both systems. For details about setting environment variables, see the Sybase IQ Reference Manual.
Create a data source name in the .odbc.ini file (on UNIX) for each server and provide detailed connection information. For details, see “Using ODBC data sources on UNIX”.
Use connection strings that specify explicit parameters instead of relying on defaults.
Confirm connections by issuing the following command:
SELECT "database name is" = db_name(), "servername_is" = @@servername
If you run multiple servers per system, Sybase IQ requires that you:
Make sure that each server has a unique name, specified with the -n parameter on startup.
Make sure that each server has a unique port number, specified with the -x parameter.
For examples using these parameters, see Sybase IQ Utility Guide.