Table of Contents | Previous
| Next
| Index
This chapter describes how to set up your database to run with the LiveWire Database Service. You should read this chapter and "Configuration Information" on page 46 before you try to use LiveWire with your JavaScript applications.
NOTE:
There may have been changes to the database clients that are supported. For
the latest information, see the Enterprise Server 3.x Release Notes.
This chapter contains the following sections:
Unlike in earlier releases, 3.x versions of Netscape servers require that you install a database client library (and a particular version of that library) if you wish to use the LiveWire Database Service. You must also configure the client library for use with LiveWire.
Netscape servers do not ship with any database client libraries. You must contact your database vendor for the appropriate library. You need only install and configure the database client libraries for the databases you will use.
If you install your database on a machine other than the one on which the web server is installed, you must have a client database library installed on the machine that has the web server. You must obtain the proper license arrangements directly from your database vendor. Netscape does not make these arrangements for you.
The requirements for configuring your database may differ if your database and your web server are installed on the same machine or on different machines. If they are on the same machine, the following information refers to it as a local configuration; if on different machines, as a remote configuration.
This chapter describes only those aspects of installing the database client that are specific to installing it for use with LiveWire. For general information on installing a database client, refer to the appropriate database vendor documentation.
After you've done the setup described in this chapter, you can use the dbadmin
sample application to verify that your database connection works properly. You use this JavaScript sample application to connect to your database server and perform various simple tasks such as executing a SELECT
statement and displaying the results or sending an arbitrary SQL command to the server.
Because you can use dbadmin
to modify and delete database tables, access to it is automatically restricted if you choose to protect the Application Manager. For more information on restricting the Application Manager, see "Controlling Access to an Application" on page 63.
The first thing you must do when using dbadmin
is to connect to a database. Choose Connect to Database. A form, shown in Figure 17.1, appears in which you can enter connection information. Enter the parameters, and click Connect to attempt to connect to the server. For information on the parameters you use to connect, see "Database Connection Pools" on page 303; for further information, see the description of the connect
method in the Server-Side JavaScript Reference.
Figure 17.1 The dbadmin
connection page
If this connection succeeds, the Execute Query page appears. In this case, your database is properly configured for working with the LiveWire Database Service. If the connection fails, the Database Connect Error page appears. In this case, make sure you've followed the instructions for your particular database and hardware configuration.
The following table summarizes the specific database vendors supported on each platform for Netscape Enterprise Server. These database vendors are not supported for Netscape FastTrack Server.
Table 17.1 Database vendor client libraries supported on each platform by Netscape Enterprise Server
The following table summarizes support for ODBC on Windows NT for both Netscape Enterprise Server and Netscape FastTrack Server.
Table 17.2 Windows NT ODBC Support
The following table summarizes support for ODBC on each Unix platform for both Netscape Enterprise Server and Netscape FastTrack Server. ODBC is not supported on DEC or AIX.
Table 17.3 Unix ODBC Support
The following table lists the capabilities of the supported ODBC drivers on NT.
Table 17.4 ODBC driver capabilities on NT
The following table lists the capabilities of the supported ODBC drivers on Unix platforms.
Table 17.5 ODBC driver capabilities on Unix
To use a DB2 server, you must have Netscape Enterprise Server. You cannot access DB2 from Netscape FastTrack Server.
If the database and the web server are on different machines, follow the instructions in "DB2 Remote" on page 363.
If the database and the web server are on the same machine, follow the instructions in "DB2 Local" on page 364.
All platforms: Install the DB2 client, version 2.1.2. For Solaris, you need APAR #JR10150. For information, see the DB2 documentation at http://www.software.ibm.com/data/db2/
.
To determine if you can connect to the DB2 server, you can issue the following command from the DB2 command line:
DB2 TERMINATE # this command allows the catalog command to take effect
DB2 CONNECT TO databasename USERID userid USING password
If you use the BLOB
or CLOB
data types in your application, you must set the longdatacompat
option in your $DB2PATH/db2cli.ini
file to 1. For example:
[Database name]
longdatacompat=1
If you make changes to the db2cli.ini
file, you must restart your web server for them to take effect.
Unix only: You must set the following environment variables:
All platforms: Install the DB2 client, version 2.1.2. For Solaris, you need APAR #JR10150. For more detailed information, see the DB2 documentation at http://www.software.ibm.com/data/db2
.
If you use the BLOB
or CLOB
data types in your application, you must set the longdatacompat
option in your $DB2PATH/db2cli.ini
file to 1. For example:
[Database name]
longdatacompat=1
If you make changes to the db2cli.ini
file, you must restart your web server for them to take effect.
Unix only: You must set the same environment variables as for a remote connection.
To use an Informix server, you must have Netscape Enterprise Server. You cannot access Informix from Netscape FastTrack Server.
If the database and the web server are on different machines, follow the instructions in "Informix Remote" on page 364.
If the database and the web server are on the same machine, follow the instructions in "Informix Local" on page 365.
Unix only: Install an Informix ESQL/C Runtime Client 7.22 (also called Informix I-Connect) and then set the following environment variables:
You must also modify $INFORMIXDIR/etc/sqlhosts
to match the service name in the /etc/services
file. For information on how to do so, see your Informix documentation.
NT only: Install an Informix ESQL/C Runtime Client 7.20 (also called Informix I-Connect.) During installation all necessary environment variables are set. You use the appropriate Informix utility to enter the necessary information about the remote server you wish to connect to.
If you run your web Server as a System, be sure that you have run regcopy.exe
.
All platforms: Depending on your name service, you may also need to edit the appropriate file to add the IP address of the remote host machine you are connecting to. On NT, this file is winnt\system32\drivers\etc\hosts
file under the NT SystemRoot. On Unix, this file is /etc/hosts
.
In the same directory, add the following line to the services
file:
ifmx_srvc
port
/tcp # Informix Online Server
where ifmx_srvc is the name of your service and port is its port number. The port number must match the port on the remote machine that the Informix server listens to. To make this line valid, you must either insert at least one space after tcp
or place a comment at the end of the line. For example, if your Informix service is named ifmx1 and the port number is 1321, you add this line:
ifmx1 1321/tcp # Informix Online Server
If you install Informix locally, you must install the Informix client before you install the Informix server.
Unix only: If you use 7.22 Online Server for Unix, the installation process creates the appropriate directory structure and sqlhosts
file. You must set the environment variables as for a remote server.
NT only: You should install the Online Server 7.20. This installs the client; no additional steps are necessary. If you run your web Server as a System, be sure that you have run regcopy.exe
.
All platforms: For information on the capabilities of the supported ODBC drivers, see "Supported Database Clients and ODBC Drivers" on page 360.
You need to have the appropriate ODBC drivers for the database you are connecting to. You also need to have additional ODBC connectivity files.
Most software products that provide (or advertise) ODBC connectivity supply an ODBC driver or drivers and ODBC connectivity.
NT only: Currently Netscape has certified with ODBC Manager version 2.5. If you have access to an ODBC driver, but not to the ODBC connectivity files, you can obtain them from the MS ODBC SDK. To get updated files for Access, Foxpro, and Excel, you may need patch WX1350 from Microsoft.
Unix only: For ODBC on Unix, you can use either the driver from Visigenic or from OpenLink. If you're using the Visigenic driver, follow the instructions in "Visigenic ODBC Driver (Unix only)" on page 368. If you're using the OpenLink driver, follow the instructions in "OpenLink ODBC Driver (Solaris only)" on page 367.
Two types of data sources can be created:
The data source describes the connection parameter for each database needing ODBC connectivity. The data source is defined using the ODBC administrator. When ODBC is installed, an administrator is also installed. Each ODBC driver requires different pieces of information to set up the data source.
Install the request broker, OpenLink Workgroup Edition ODBC Driver, on the database server. This must be running before you can connect to the database using the OpenLink request agent.
Install the request agent, in OpenLink Generic ODBC client version 1.5, on the database client machine.
Rename or copy the request agent's driver manager file from libiodbc.so
to libodbc.so
in the $ODBCDIR/lib
directory, where $ODBCDIR
is the directory in which ODBC is installed.
When you installed your server, you installed it to run as some user, either root, nobody, or a particular server user. The user you pick must have a real home directory, which you may have to create. For example, the default home directory for the nobody user on Irix is /dev/null
. If you install your server on Irix as nobody, you must give the nobody user a different home directory.
In that home directory, you must have an .odbc.ini
file. For example, if you run the server as root, this file is under the root (/) directory.
Set the following environment variables:
When you installed your server, you installed it to run as some user, either root, nobody, or a particular server user. The user you pick must have a real home directory, which you may have to create. For example, the default home directory for the nobody user on Irix is /dev/null
. If you install your server on Irix as nobody, you must give the nobody user a different home directory.
In that home directory, you must have an .odbc.ini
file. For example, if you run the server as root, this file is under the root (/) directory.
Set the following environment variable:
To use an Oracle server, you must have Netscape Enterprise Server. You cannot access Oracle from Netscape FastTrack Server.
If the database and the web server are on different machines, follow the instructions in "Oracle Remote" on page 369.
If the database and the web server are on the same machine, follow the instructions in "Oracle Local" on page 369.
Unix only: Make sure you can connect to your Oracle database via SQL*Net. When you have finished installation, you can use a loopback test to verify that you connected correctly. For example, from within sqlplus
, you can try to connect to your database with the following command:
connect username/password@service_name
Or, from the Unix command line, you could use this command:
sqlplus username/password@service_name
In these commands, you use the service_name from your tnsnames.ora
file.
NT only: You must install the Oracle 7.3.2 client software for NT. Oracle 7.1 and 7.2 clients are not supported. You must also create the Oracle configuration files using the appropriate Oracle configuration utility.
Unix only: Before you can connect to Oracle under Irix, you must have the appropriate Irix patches. See Enterprise Server 3.x Release Notes for information on the patches you need.
You must install the Oracle 7.3.x client software for Unix. Oracle 7.1 and 7.2 clients are not supported.
You must set the following environment variables:
If you do not set these environment variables properly, Oracle returns the ORA-1019 error code the first time you attempt to connect. For information on error handling, see Chapter 19, "Error Handling for LiveWire."
Unix only: Before you can connect to Oracle under Irix, you must have the appropriate Irix patches. See Enterprise Server 3.x Release Notes for information on the patches you need.
All platforms: You must install an Oracle Workgroup, Enterprise Server 7.3.2 (NT), or Enterprise Server 7.3.x (Unix). Oracle 7.1 and 7.2 clients are not supported. Check with your server vendor to verify that the Oracle server version is compatible with the Oracle client.
You must set the following environment variables:
When your Oracle database server is local, you must pass the empty string as the second argument to the connect
method of the database
or DbPool
object or to the DbPool
constructor. This way, those methods use the value of the ORACLE_SID
environment variable. For example:
database.connect ("ORACLE", "" "user", "password", "");
For more information on Oracle installation, see Oracle's documentation.
To use a Sybase server, you must have Netscape Enterprise Server. You cannot access Sybase from Netscape FastTrack Server.
If the database and the web server are on different machines, follow the instructions in "Sybase Remote" on page 370.
If the database and the web server are on the same machine, follow the instructions in "Sybase Local" on page 371.
In addition, if you're using a Unix platform and Sybase has a multithreaded driver for that platform, follow the instructions in "Sybase (Unix only)" on page 371. See Enterprise Server 3.x Release Notes for a list of the Unix platforms on which Sybase has a multithreaded driver.
Unix only: Set the following environment variable:
For Solaris, you must also follow the instructions in "Sybase (Unix only)" on page 371.
All platforms: You must install SYBASE Open Client/C. Supported versions are listed in "Supported Database Clients and ODBC Drivers" on page 360.
You can use the appropriate Sybase utility to enter, in the sql.ini
file (NT) and the interfaces
file (all platforms), the information about the remote server you want to connect to. For more information, see your Sybase documentation.
Unix only: Set the following environment variable:
For Solaris, you must also follow the instructions in "Sybase (Unix only)" on page 371.
All platforms: Install a Sybase SQL Server, version 11.1; the client portion is installed with the server. Supported versions are listed in "Supported Database Clients and ODBC Drivers" on page 360.
You can use the appropriate Sybase utility to enter the information about the remote server you want to connect to in the sql.ini
file (NT) and the interfaces
file (all platforms). For more information, see your Sybase documentation.
On some Unix platforms, Sybase has both a single-threaded driver and a multithreaded driver. If Sybase has a multithreaded driver for a particular Unix machine, you must use the multithreaded driver with LiveWire. On these platforms, your web server will behave unpredictably with the single-threaded driver. This requirement applies for both a local and a remote connection. It does not apply to Windows platforms.
See Enterprise Server 3.x Release Notes for a list of the Unix platforms on which Sybase has a multithreaded driver.
To ensure that you use the multithreaded driver, you must edit your $SYBASE/config/libtcl.cfg
file. This file contains a pair of lines that enable either the single-threaded or the multithreaded driver. You must have one of these lines commented out and the other active. For example, on Solaris locate these lines:
[DRIVERS]
;libtli.so=tcp unused ; This is the nonthreaded tli driver.
libtli_r.so=tcp unused ; This is the threaded tli driver.
Make sure that the line for the single-threaded driver is commented out and that the line for the multithreaded driver is not commented out. The filename differs on each platform, but the lines are always in the DRIVERS
section and are always commented to indicate which is the single-threaded and which the multithreaded driver.
NOTE:
If you wish to use the Sybase isql
utility, you must use the nonthreaded tli
driver. In this case, the line for libtli_r.so
must be commented out. For
information on using this driver, see your Sybase documentation.
Table of Contents | Previous
| Next
| Index
Last Updated: 11/12/98 15:29:43
Copyright (c) 1998
Netscape Communications Corporation