Connecting to DB2 Databases
You perform the following steps:
You should be familiar with DB2 to successfully complete this process. Gather the
following information before you begin:
Set environment variables
After you install the Client Enabler, you need to run some scripts to set up your
environment. You must also set environment variables to run the command line tool
db2.
Look in the <installdir>/sqllib directory for the db2profile and db2cshrc scripts.
Catalog a TCP/IP node
You must add an entry to the client's node directory to describe the remote node.
This entry specifies the chosen alias (node_name), the hostname (or ip_address),
and the servicename (or port_number) that the client will use to access the remote
server.
To catalog a TCP/IP node:
1
2
Catalog the database
Before a client application can access a remote database, the database must be
cataloged on the server node and on any client nodes that will connect to it. When
Set environment variables.
Catalog a TCP/IP node.
Catalog the database.
Test the connection.
Host name where the DB2 database server resides
Node name
Database name
Database alias
Database user id and password
Service name from the /etc/services file on client and host
For sh or ksh, run:
<installdir>/sqllib/db2profile
For csh, run:
source <installdir>/sqllib/db2cshrc
Run the db2 command line utility db2.
At the db2 prompt, enter the following:
db2 => catalog tcpip node dbserver1node remote db2unixhost server
db2server1
db2 =>terminate
17
Need help?
Do you have a question about the COLDFUSION 5-ADVANCED ADMINISTRATION and is the answer not in the manual?