Connecting to DB2 Databases
19
Data source settings for the ColdFusion DB2 native driver
The data source setting for the native driver must point to the database name and
include a valid DB2 login name and password. The catalog procedures described in
the previous section 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 17.
To connect to your DB2 database:
1
From the DB2 command line processor, connect your DB2 database using the
following syntax:
db2=> CONNECT TO <
database_name
> USER <
userid
> USING <
password
>
2
Bind the MERANT SQL files to the database, using special options on the BIND
command, based on your installation. For a detailed list of BIND options, see the
DB2 Command Reference.
To bind the MERANT SQL files to the DB2 database:
1
Enter the following commands:
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
2
Enter quit to exit the DB2 command processor.
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
Use the PREP command to precompile the source file; for example: PREP
C:\TEMP\OUTSRV.SQC.
When this command executes (barring any errors), you should have a C source
file; for example, OUTSRV.C.
2
Compile and link the .C file generated in step 1 to get the dll file.
Summary of Contents for COLDFUSION 5-ADVANCED ADMINISTRATION
Page 1: ...Macromedia Incorporated Advanced ColdFusion Administration ColdFusion 5...
Page 20: ......
Page 56: ...38 Chapter 1 Advanced Data Source Management...
Page 74: ...56 Chapter 2 Administrator Tools...
Page 76: ......
Page 86: ...68 Chapter 3 ColdFusion Security...
Page 87: ...To Learn More About Security 69...
Page 88: ...70 Chapter 3 ColdFusion Security...
Page 130: ...112 Chapter 5 Configuring Advanced Security...
Page 132: ......
Page 154: ...136 Chapter 6 Configuring Verity K2 Server...
Page 162: ...144 Chapter 7 Indexing XML Documents...
Page 202: ...184 Chapter 8 Verity Spider...
Page 236: ...218 Chapter 10 Verity Troubleshooting Utilities...
Page 238: ......
Page 348: ...330 Chapter 14 ClusterCATS Utilities...
Page 349: ...Using sniff 331...
Page 350: ...332 Chapter 14 ClusterCATS Utilities...
Page 362: ...344 Chapter 15 Optimizing ClusterCATS...
Page 372: ...354 Index...