When using multiple DB2® copies of DB2 database products or multiple data server driver copies, various options are available for applications to access the DB2 databases. Existing applications will continue to function properly.
Restrictions
Only one copy can be used within the same process for each of the following modes of connecting to databases.
While this topic mainly deals with issues on Windows operating systems, on Linux and UNIX operating systems, you also cannot access instances associated with multiple DB2 copies within the same process.
To use a DB2 copy other than the default, in the connection string, specify the IBMDADB driver name for this DB2 copy, which will be of the format: IBMDADB2.$DB2_COPY_NAME. Some applications might not have the ability to change the connection strings without recompiling, therefore these applications will only work with the default DB2 copy. If an application uses the default program id, ibmdadb2, or the default clsid, it will always use the default DB2 copy.
The IBM Data Server Provider for .NET is not accessed by the DB2 database product identified by the copy name. Instead, depending on the version of the provider that the application requires, it finds that version and uses it using the standard methods.
JDBC uses the current version of the driver in the classpath. By default, the classpath is configured to point to the default DB2 copy. Running db2envar.bat from the DB2 copy you want to use will update your PATH and CLASSPATH settings for this copy.
CLI applications that dynamically load the IBM data server client libraries should use the LoadLibraryEx API with the LOAD_WITH_ALTERED_SEARCH_PATH option, instead of the LoadLibrary option. If you do not use the LoadLibraryEx API with the LOAD_WITH_ALTERED_SEARCH_PATH option, specify db2app.dll in the Path by running db2envar.bat from the bin directory of the DB2 copy that you want to use. For applications that link using db2apie.lib, to use a different DB2 copy, you can use the /delayload option in your link command to delay load db2app.dll and call the db2SelectDB2Copy API before any DB2 calls.
To reduce the number of system tray executables running on the system, by default any items in the system tray that are running in the previous default DB2 copy when the default copy is changed are disabled.