SQL adaptation guide For IBM DB2 UDB 8.x, 9x / Installation (Runtime Configuration) |
# db2dir /instance/db2icrt -a server -s client instance-user
# db2 "catalog tcpip node db2node remote hostname server tcp-service"
# db2 "catalog database datasource at node db2node authentication server"
# db2 "connect to datasource user dbuser using password"
(where dbuser is a database user declared on the remote database server)
[datasource] PATCH2=15
For more details, see the DB2 README.TXT file in the SQLLIB directory.
On UNIX platforms, the variable is specific to the operating system. For example, on Solaris and Linux™ systems, it is LD_LIBRARY_PATH, on AIX® it is LIBPATH, or HP/UX it is SHLIB_PATH . On Windows, you define the DLL search path in the PATH environment variable.
DB2 UDB version | Shared library environment setting |
---|---|
DB2 UDB 7.x and 8.x | UNIX: Add $DB2DIR/lib (for 32 bit) or $DB2DIR/lib64 (for 64 bit) to LD_LIBRARY_PATH (or its equivalent). Windows: Add %DB2DIR%\bin to PATH. |
DB2 UDB 9.x | UNIX: Add $DB2DIR/lib32 (for 32 bit) or $DB2DIR/lib64 (for 64 bit) to LD_LIBRARY_PATH (or its equivalent). Windows: Add %DB2DIR%\bin to PATH. |
$ db2
db2 => CONNECT TO dbname USER username USING password
dbi.database.dbname.db2.schema = 'name'
Here dbname identifies the database name used in the BDL program ( DATABASE dbname ) and name is the schema name to be used in the SET SCHEMA instruction. If this entry is not defined, no "SET SCHEMA" instruction is executed and the current schema defaults to the user's name.