NOTE: The information in this chapter is accurate as of its writing (12/19/97). Since then, there may have been changes to the database clients that are supported. For the latest information, see the Enterprise Server 3.x Release Notes.Sections in this chapter:
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".
The first thing you must do when using dbadmin
is to connect to a database. Choose Connect to Database. A form, shown in Figure 10.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"; for further information, see the description of the connect
method in the JavaScript Reference.
Figure 10.1 The
dbadmin
connection page
Supported Database Clients and ODBC Drivers
Table 10.1 summarizes the specific database vendors supported on each platform for Netscape Enterprise Server. These database vendors are not supported for Netscape FastTrack Server.
Table 10.1 Database vendor client libraries supported on each platform by Netscape Enterprise Server
1 Oracle SQL*Net version 1.1 is no longer supported. |
Table 10.2 summarizes support for ODBC on Windows NT for both Netscape Enterprise Server and Netscape FastTrack Server.
Table 10.2 Windows NT ODBC Support
Table 10.3 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.
1 For important information on the availability of Visigenic ODBC drivers, see "ODBC". |
Table 10.4 lists the capabilities of the supported ODBC drivers on NT.
Table 10.4 ODBC driver capabilities on NT
Table 10.5 lists the capabilities of the supported ODBC drivers on Unix platforms.
Table 10.5 ODBC driver capabilities on Unix
DB2
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".
If the database and the web server are on the same machine, follow the instructions in "DB2 Local".
DB2 Remote
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
If you use the
DB2 CONNECT TO databasename USERID userid USING passwordBLOB
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]
If more than one user will access DB2 concurrently, you must set the
longdatacompat=1disablemultithread
option in your $DB2PATH/db2cli.ini
file to 0. For example:
[common]
If you make changes to the
disablemultithread=0db2cli.ini
file, you must restart your web server for them to take effect.
Unix only: You must set the following environment variables:
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the DB2INSTANCE
variable, your start script could include this information:
DB2INSTANCE=inst1; export DB2INSTANCE
...other environment variables...
...rest of start script... DB2 Local
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]
If you use DB2 with more than one client, you must set the
longdatacompat=1disablemultithread
option in your $DB2PATH/db2cli.ini
file to 0. For example:
[common]
If you make changes to the
disablemultithread=0db2cli.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. For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the DB2INSTANCE
variable, your start script could include this information:
DB2INSTANCE=inst1; export DB2INSTANCE
...other environment variables...
...rest of start script... Informix
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".
If the database and the web server are on the same machine, follow the instructions in "Informix Local".
Informix Remote
Unix only: Install an Informix ESQL/C Runtime Client 7.22 (also called Informix I-Connect) and then set the following environment variables:
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the INFORMIXDIR
variable, your start script could include this information:
INFORMIXDIR=/usr/informix; export INFORMIXDIR
You must also modify
...other environment variables...
...rest of start script...$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:
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 ifmx_srvc
port
/tcp # Informix Online Servertcp
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
Informix Local
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. For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the INFORMIXDIR
variable, your start script could include this information:
INFORMIXDIR=/usr/informix; export INFORMIXDIR
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
...other environment variables...
...rest of start script...regcopy.exe
.
ODBC
All platforms: For information on the capabilities of the supported ODBC drivers, see "Supported Database Clients and ODBC Drivers".
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)". If you're using the OpenLink driver, follow the instructions in "OpenLink ODBC Driver (Solaris only)".
Important Visigenic will no longer enhance their existing ODBC drivers or SDK products. Instead, Visigenic has selected INTERSOLV to provide an upgrade path for these drivers and products. Visigenic will continue to support existing ODBC drivers and SDK products until August 31, 1998. Visigenic ODBC customers can renew their current maintenance contract for a prorated, discounted amount through that date. Through December 31, 1997, customers can obtain, at a reduced cost, an INTERSOLV 3.0-level ODBC driver for the equivalent Visigenic driver they're using today, provided they have a current Visigenic maintenance contract. In the near future, Visigenic will provide a document covering the operational differences between Visigenic and INTERSOLV ODBC drivers.
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:
LD_LIBRARY_PATH | (Solaris and Irix) Add the location of the ODBC libraries to this variable. |
UDBCINI |
Specifies the location of the .odbc.ini file.
|
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at
server-root
/
https-yourServer
/start
. For example, to set the LD_LIBRARY_PATH
variable, your start script could include this information:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/odbcsdk/lib; export LD_LIBRARY_PATH
...other environment variables...
...rest of start script... Visigenic ODBC Driver (Unix only)
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:
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the LD_LIBRARY_PATH
variable, your start script could include this information:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/odbcsdk/lib; export LD_LIBRARY_PATH
...other environment variables...
...rest of start script... Oracle
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".
If the database and the web server are on the same machine, follow the instructions in "Oracle Local".
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.
Oracle Remote
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:
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the ORACLE_HOME
variable, your start script could include this information:
ORACLE_HOME=/export/oracle73; export ORACLE_HOME
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 12, "Error Handling for LiveWire."
...other environment variables...
...rest of start script...
Oracle Local
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:
ORACLE_HOME | Specifies the top-level directory in which Oracle is installed. |
ORACLE_SID | Specifies the Oracle System Identifier. |
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the ORACLE_HOME
variable, your start script could include this information:
ORACLE_HOME=/export/oracle73; export ORACLE_HOME
When your Oracle database server is local, you must pass the empty string as the second argument to the
...other environment variables...
...rest of start script...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.
Sybase
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".
If the database and the web server are on the same machine, follow the instructions in "Sybase Local".
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)". See Enterprise Server 3.x Release Notes for a list of the Unix platforms on which Sybase has a multithreaded driver.
Sybase Remote
Unix only: Set the following environment variable:
SYBASE | The top-level directory in which Sybase is installed |
LD_LIBRARY_PATH |
(DEC) Must include $SYBASE/lib .
|
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the SYBASE
variable, your start script could include this information:
SYBASE=/home/sybase; export SYBASE
For Solaris, you must also follow the instructions in "Sybase (Unix only)".
...other environment variables...
...rest of start script...
All platforms: You must install SYBASE Open Client/C. Supported versions are listed in "Supported Database Clients and ODBC Drivers".
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.
Sybase Local
Unix only: Set the following environment variable:
SYBASE | The top-level directory in which Sybase is installed |
LD_LIBRARY_PATH |
(DEC) Must include $SYBASE/lib .
|
For the environment variables to take affect, you must stop the server, and then from the same command line prompt set the environment variables and start the server again. You must set the environment variables every time you start the server.
Instead of setting the variables from the command line, you may choose to set them in the web server's start script. If you do so, you can use the Admin Server to start your web server. The web server start script is at server-root
/
https-yourServer
/start
. For example, to set the SYBASE
variable, your start script could include this information:
SYBASE=/home/sybase; export SYBASE
For Solaris, you must also follow the instructions in "Sybase (Unix only)".
...other environment variables...
...rest of start script...
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".
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.
Sybase (Unix only)
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]
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
;libtli.so=tcp unused ; This is the nonthreaded tli driver.
libtli_r.so=tcp unused ; This is the threaded tli driver.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 Sybaseisql
utility, you must use the nonthreadedtli
driver. In this case, the line forlibtli_r.so
must be commented out. For information on using this driver, see your Sybase documentation.
Last Updated: 12/19/97 15:35:33