Db2 Binding And Privileges For Odbc (Unix); Executing A Db2 Stored Procedure (Windows, Unix) - MACROMEDIA COLDFUSION 4.5-ADMINISTRING COLDFUSION SERVER Manual

Table of Contents

Advertisement

Chapter 4: Managing Data Sources
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
prompt. The bind files are located in the
directory. Before you proceed with the steps in this section, set up your environment
by running the
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
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:
C:\TEMP\OUTSRV.SQC
When this command is executed (barring any errors) you should be left with a C
source file, for example,
or
db2profile
db2csh
.
quit
.
OUTSRV.C
<installdir>/coldfusion/odbc/db2
script as described in "Set environment
109
from a shell
db2
PREP

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-ADMINISTRING COLDFUSION SERVER and is the answer not in the manual?

This manual is also suitable for:

Coldfusion 4.5

Table of Contents