BackUp LevelNext

Configuring Native Database Drivers

The Enterprise edition of ColdFusion Application Server includes support for Sybase System 11, Sybase Adaptive Server 11.5, and Oracle 7.3 and 8.0 databases through native database drivers on Windows and Solaris.

Native database driver options vary according to the type of data source you are creating. For information about ColdFusion-specific settings, see ColdFusion Settings .

Software requirements

In order to use the native database drivers, you may need additional client software. The following table details requirements for each database and each supported platform.

Software Requirements for Native Database Drivers
Database Client Software
Oracle 7.3 Oracle 7.3.x client
Oracle 8.0 Oracle 8.0 client
Sybase System 11 Sybase Adaptive Server 11.5 Sybase Open Client version 11.1.0 with Update 11.1.1 applied (Solaris and Windows NT)

The database client software and ColdFusion Application Server must reside on the same system.

Summary of steps

 

To create an Oracle data source using the native driver:

  1. Install the required client software, referring to the software requirements table above.
  2. Use the SQL Net Easy Configuration utility to create a database alias. The Solaris version of this utility can be found in $ORACLE_HOME/bin/net8wiz.sh.
  3. Create the data source in the Cold Fusion Administrator Native Drivers page.
  4. Edit the coldfusion/bin/start script to include the following values:

To create a Sybase data source using the native driver:

  1. Install the required client software, referring to the software requirements table above.
  2. Verify the connection to the database using a tool like Sybase SQL Advantage.
  3. Create the data source in the Cold Fusion Administrator Native Drivers page.

Example: Configuring the Oracle 8 native driver

The following scenario depicts the typical configuration steps for using the Oracle 8 native database driver. This procedure was written against version 8.0.4.0.0 of the Oracle 8 Client.

Before you get started

Before you get started, make sure you have the following information handy:

First step: Install the Oracle 8 Client:

  1. Install the Oracle 8 Client software.
  2. Select the Database administrator or Application user option in the following dialog. In this example, we chose Application user.
  3. Step through options involving stopping Oracle services that may be running on your system, and choosing whether to install online documentation.

Second step: Run the Oracle Net8 Easy Config utility:

This step creates a database alias you use to reference the Oracle database when creating the data source in the ColdFusion Administrator. The process of creating the database alias writes all of the database connection information to a configuration file called tnsnames.ora.

  1. Open the Oracle Net8 Easy Config utility. The icon is found in your Oracle for Windows NT program group. On Solaris, this utility is found in $ORACLE_HOME/bin/net8wiz.sh.
  2. You want to add a new service, so enter a New Service Name and click Next.

  3. In the resulting dialog, select TCP/IP as the networking protocol to connect with and use the Oracle 8 database you want to use in your ColdFusion application.
  4. In the dialog that appears, you now need to enter the host name of the server where the Oracle 8 database resides. We took the default for the port number.

  5. After entering a hostname, you enter the Database SID, which identifies your specific Oracle database instance. The default is ORCL, but your database SID might be different. See your database administrator (DBA) for this information.
  6. In the next dialog, you test the database service you have created. To test the connection to the Oracle database, you'll need to enter a valid username and password for accessing the Oracle database. If you don't have this information, see your DBA.

    Now you need to create the data source in ColdFusion.

Creating the data source in ColdFusion:

  1. Open the ColdFusion Administrator to the Data sources, Native Drivers page.
  2. Enter a data source name and select the Oracle 8 native driver from the drop down list.
  3. When you click Add, ColdFusion opens the configuration page for the data source. Here you enter information that tells ColdFusion where to find the database. The options that are most important for a successful connection are:
  1. Once you have created the data source, open the Verify Data Source page in the Administrator to verify that ColdFusion can connect to the Oracle 8 database.

Oracle 8.0 native database options

ColdFusion native database options for Oracle 8.0 data sources are described in the following table.

Oracle 8.0 Native Database Driver Options
Option Description
Data Source Name A name for your ODBC data source.
Description Descriptive information about the data source.
Host String Enter the database alias you created using the Oracle Net8 Easy Config utility. To find the database alias for the database you want to connect to, you can use the Oracle Net8 Easy Config utility.

What to do if the connection test fails

If the basic information you entered in the Oracle Net8 Easy Config is correct, then a visit to your local Oracle 8 DBA is probably in order. First thing to do is check the basic connection information: hostname, SID, username and password. You can do this using the Net8 Easy Config utility or by directly inspecting the tnsnames.ora file.

In addition, on Solaris, make sure you have the Oracle client library and ORACLE_HOME defined in the coldfusion/bin/start script.

In some cases, connection problems were solved by clearing your system of the Oracle 8 Client and reinstalling it. Unfortunately, Oracle does not provide an uninstaller for the Oracle 8 Client.


BackUp LevelNext

allaire

AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.