Chapter 4: Managing Data Sources
109
Data source settings for the ColdFusion DB2 native driver
The data source setting for the native driver need to point to the database name, and
include a valid DB2 login name and password. The catalog procedures described
above make the connection through the DB2 Client Enabler software.
DB2 Binding and Privileges for ODBC (UNIX)
Access to DB2 requires that you bind and grant privileges to the MERANT bind files. To
locate the bind files, enter the DB2 command line processor by typing
db2
from a shell
prompt. The bind files are located in the
<installdir>/coldfusion/odbc/db2
directory. Before you proceed with the steps in this section, set up your environment
by running the
db2profile
or
db2csh
script as described in “Set environment
variables” on page 107.
To connect to your DB2 database
From the DB2 command line processor, connect your DB2 database using the
following syntax:
db2=> CONNECT TO <database_name> USER <userid> USING <password>
To bind the MERANT SQL files to the DB2 database
The next step is to bind the MERANT SQL files to the database. You can use special
options on the BIND command, based on your installation. Consult the DB2
Command Reference for a detailed list of BIND options. To bind the files, enter the
commands listed in the following sections. To exit the DB2 command processor, enter
the verb
quit
.
db2=> BIND iscsso.bnd blocking all grant public
db2=> BIND isrrso.bnd blocking all grant public
db2=> BIND isurso.bnd blocking all grant public
db2=> BIND iscswhso.bnd blocking all grant public
db2=> BIND isrrwhso.bnd blocking all grant public
db2=> BIND isurwhso.bnd blocking all grant public
Executing a DB2 Stored Procedure (Windows, UNIX)
Follow these steps to execute a DB2 stored procedure through ColdFusion.
To execute a DB2 stored procedure:
1.
Precompile the source file. Use the PREP command for this. For example:
PREP
C:\TEMP\OUTSRV.SQC
.
When this command is executed (barring any errors) you should be left with a C
source file, for example,
OUTSRV.C
Summary of Contents for COLDFUSION 4.5-ADMINISTRING COLDFUSION...
Page 1: ...Allaire Corporation Administering ColdFusion Server ColdFusion 4 5...
Page 10: ...x Administering ColdFusion Server...
Page 22: ...xxii AdministeringColdFusionServer...
Page 48: ...26 Administering ColdFusion Server...
Page 58: ...36 Administering ColdFusion Server...
Page 60: ...38 Administering ColdFusion Server Using ColdFusion in a Distributed Configuration 68...
Page 98: ...76 Administering ColdFusion Server...
Page 150: ...128 Administering ColdFusion Server...
Page 198: ...176 Administering ColdFusion Server...
Page 205: ...Chapter 6 Creating Scalable and Highly Available Web Sites 183 3 Click the DNS tab...