SQL adaptation guide for IBM DB2 UDB 10.x / 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.
DB2 UDB version | Shared library environment setting |
---|---|
DB2 UDB 9.x and higher | 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.driver = "dbmdb2"
dbi.database.dbname.source = "test1"
Use the following entry to define the database schema to be used by the application. The database interface will automatically perform a SET SCHEMA name instruction to switch to a specific schema:
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.