18
you create a database, it is automatically cataloged on the server with the database
alias (
uses the information in the database directory, along with the information in the
node directory, to establish a connection to the remote database.
To add an entry to the client's database node directory:
1
2
Test the connection
You are now ready to test the connection with a known table. The following
procedure uses a table that is installed with DB2.
To test the connection:
1
2
Data source and start script settings for DB2 (UNIX)
This section describes changes that you must make to the ColdFusion start script.
You must set the following environment variables in the <installdir>/coldfusion/
bin/start script file:
# DB2 environment variables
DB2INSTANCE=db2inst1
INSTHOME=/export/home/db2inst1
# Set library search path
#
# NOTE: Add your database client library directory to the FRONT of this
#
# Example:
#
LD_LIBRARY_PATH=/usr/dt/lib:/lib:/usr/openwin/lib:$INSTHOME/sqllib/
#
# This is the list of variables that ColdFusion will see
# Add any special Database environment variables here
#
VAR_LIST="LD_LIBRARY_PATH DB2INSTANCE INSTHOME CFHOME SYBASE
) the same as the database name (
database_alias
Run the db2 command line utility db2.
At the db2 prompt, enter the following:
db2 => catalog database sample as sample1 at node dbserver1node
db2 =>terminate
Run the DB2 command line utility db2.
At the db2 prompt, enter the following:
db2 => connect to sample1 user username using password
db2 => select * from employee
db2 => terminate
list
lib:$CFHOME/lib
ORACLE_HOME INFORMIXDIR INFORMIXSERVER II_SYSTEM"
Chapter 1 Advanced Data Source Management
database_name
). The client
Need help?
Do you have a question about the COLDFUSION 5-ADVANCED ADMINISTRATION and is the answer not in the manual?