There are several ways to avoid conflicts when using shared memory.
Create a temporary directory that is dedicated to each server. Make sure that each client uses the same temporary directory as its server by setting the IQTMP16 environment variable explicitly on both systems.
For each server, create a datasource name in theĀ .odbc.ini file (on UNIX) and provide detailed connection information.
Use connection strings that specify explicit parameters instead of relying on defaults.
SELECT "database name is" = db_name(), "servername_is" = @@servername
Name, specified with the -n parameter on startup.
Port number, specified with the -x parameter.