|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
- Install the required client software, referring to the software requirements table above.
- 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 .
- Create the data source in the Cold Fusion Administrator Native Drivers page.
- Edit the
coldfusion/bin/start script to include the following values:
- The database variable
ORACLE_HOME
- The library path set in
LD_LIBRARY_PATH .
|
|
|
|
To create a Sybase data source using the native driver:
|
|
|
- Install the required client software, referring to the software requirements table above.
- Verify the connection to the database using a tool like Sybase SQL Advantage.
- 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:
- The name of the host system where the Oracle database resides.
- The System Identifier (SID) for your Oracle 8 database.
- A login ID and password for connecting to the Oracle 8 database.
|
|
|
|
First step: Install the Oracle 8 Client:
|
|
|
- Install the Oracle 8 Client software.
- Select the Database administrator or Application user option in the following dialog. In this example, we chose Application user.
- 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 .
- 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 .
- You want to add a new service, so enter a New Service Name and click Next.
- 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.
- 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.
- 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.
- 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:
|
|
|
- Open the ColdFusion Administrator to the Data sources, Native Drivers page.
- Enter a data source name and select the Oracle 8 native driver from the drop down list.
- 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:
- Host string -- Enter the exact database alias you created using the Oracle Net8 Easy Config utility.
- ColdFusion Login username and password -- These options appear when you click the CF Settings button. The username and password are the same as those used in the Oracle Net8 Easy Config connection test. If you don't know what the username and password should be, see your Oracle 8 DBA.
- 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.
|
|
|
  
|
|
|
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.
|