Db2 Binding And Privileges For Odbc (Unix); Executing A Db2 Stored Procedure (Windows, Unix) - MACROMEDIA COLDFUSION 5-ADVANCED ADMINISTRATION Manual

Table of Contents

Advertisement

Connecting to DB2 Databases
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
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
2
To bind the MERANT SQL files to the DB2 database:
1
2

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
2
From the DB2 command line processor, connect your DB2 database using the
following syntax:
db2=> CONNECT TO <database_name> USER <userid> USING <password>
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.
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
Enter quit to exit the DB2 command processor.
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.
Compile and link the .C file generated in step 1 to get the dll file.
19
from a
db2

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5-ADVANCED ADMINISTRATION and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 5

Table of Contents