Database Configuration Guide
CHAPTER 6
This chapter describes how to configure your Oracle database for use with the Novell exteNd Application Server as a SilverMaster or deployment database. It includes these sections:
For the latest information on supported database versions, see the Novell exteNd Application Server Release Notes.
You'll perform the following setup steps no matter which driver your Novell exteNd Application Server will use to access an Oracle database:
Creating a new Oracle tablespace for use with SilverMaster ensures optimal performance and ease of installation. To create one, run SQL Plus and connect to Oracle as System or SYSDBA.
For example, this statement creates a tablespace with an initial size of 30 MB:
CREATE TABLESPACE SilverTablespace DATAFILE `c:\databases\silvertablespace.dbf' SIZE 30M;
You can issue this statement from a SQL Plus prompt. If you choose to use an existing tablespace, make sure there is enough space available.
To connect the application server to Oracle, create a new Oracle user for exclusive use by the application server. This user will own the SilverMaster tables.
Issue the following statements using the SQL Plus utility. These statements create the user and set the user's privileges.
CREATE USER smuser IDENTIFIED BY password DEFAULT TABLESPACE SilverTablespace QUOTA UNLIMITED ON SilverTablespace; GRANT CONNECT, RESOURCE to smuser; REVOKE UNLIMITED TABLESPACE from smuser;
The application server connects to Oracle databases using one of the following drivers:
A Type 2 JDBC driver written and provided by Novell (this driver interfaces with the Oracle SQL Net Client to achieve connectivity to the Oracle server)
See the application server's Release Notes for which versions of Oracle databases you can use with which drivers.
The application server can connect to Oracle databases using the thin JDBC driver supplied by Oracle.
You must have the Oracle Thin JDBC Driver installed on the machine where the application server will be. It must be able to connect to the destination Oracle database.
The location of the Oracle Thin JDBC Driver (for example, DriverPath/ojdbc14.jar and DriverPath/nls_charset12.zip) must be specified in the AGCLASSPATH variable. For Windows, AGCLASSPATH is a system environment variable. For UNIX, you'll find it in the .agprofile file. For NetWare, you need to use the setenv command to set AGCLASSPATH (setenv AGCLASSPATH=
path1
;
path2
;
path3
;...
).
For details, see the chapter on data source configuration in the Administrator's Guide.
The application server can connect to Oracle 9i databases using the OCI driver supplied by Oracle.
You must have the Oracle OCI Driver installed on the machine where the application server will be. It must be able to connect to the destination Oracle database.
The location of the Oracle OCI Driver (for example, DriverPath/ojdbc14.jar and DriverPath/nls_charset12.zip) must be specified in the AGCLASSPATH variable. For Windows, AGCLASSPATH is a system environment variable. For UNIX, you'll find it in the .agprofile file.
For details, see the chapter on data source configuration in the Administrator's Guide.
The application server can connect to Oracle databases using the Type 2 JDBC driver supplied by Novell. Setup involves these steps:
If Version 2.3.4.0.0 of the Oracle SQL Net Client is not installed on the application server machine, install it now before you continue. If you do not have this version of SQL Net, obtain it from Oracle Corporation. Using the Oracle CD, follow the steps to install the client for an application user.
If you already have the client installed, you can run Oracle Installer (from the Oracle for Windows NT Program Folder) to determine the version of SQL Net that is installed.
In order to connect to the Oracle server, you must have a valid Oracle SQL Net Alias that references the target Oracle server.
To create an Oracle SQL Net Alias:
Run SQL Net Easy Configuration from the Oracle for Windows NT Program Group.
NOTE: On UNIX, run net8wiz.sh from the $ORACLE_HOME/bin/ directory.
Enter the name of the alias (you specify this name during the application server installation).
Enter the TCP/IP Host Name for the Oracle server and enter the correct Instance name.
Choose Yes to create the new alias. At this point you can exit the SQL Net Easy Configuration utility.
Test the newly created SQL Net Alias by using SQL Plus to connect to the Oracle database server.
Now you're ready to access the Oracle database from the application server. This enables you to do any of the following, as appropriate:
Install the application server and point to that database as the SilverMaster (as described in Installing Novell exteNd)
Add that database to the application server for use as a deployment database
Add a connection pool to the application server for accessing that database
For more information, see the chapter on data source configuration in the Administrator's Guide.
Adding an Oracle database to the application server equates to adding an Oracle user. Adding a database does two things:
Adds all the tables and views that the database user has access to
Creates the application server's system tables to store metadata
Storing system tables separately If you want to store the application server's system tables in a separate database account, create an additional database user as described above and, if using the Novell exteNd Oracle driver, create a new Oracle SQL Net Alias. The system tables may also be stored in any other databases supported by the application server.
Using a different character set You can tell the Novell exteNd Oracle 8 driver to use a different character set than what is specified in the Oracle instance. You would do this when the character set encoding of the data is different than the character set specified by the Oracle instance. A white paper about this topic is available on the Novell exteNd Application Server product support site.
Specifying the database if you are using the OCI or Novell exteNd Oracle driver When adding an Oracle database to the application server, you are asked for the name of the database. If you are using the OCI or Novell exteNd Oracle driver, the database name refers to the Oracle SQLNet Alias or tnsnames.ora entry. The SQLNet Alias points to a specific Oracle Database Instance on a specific server. Typically you have one per Oracle database.
The application server requires a unique database name. This means that it requires you to create a unique SQLNet Alias for each Oracle database user you add. So if you have SilverMaster, application tables, and the application server's system tables stored in three different Oracle database users, you need three unique SQLNet Aliasesone for each user. Each SQLNet Alias points to the same Oracle database.
Optionally, if you do not want to configure multiple SQLNet Aliases, see Using one SQLNet Alias.
Oracle 8i notes Note the following:
This is an optional advanced feature if you are using the OCI or Novell exteNd Oracle driver. By default, the Add Database process assumes you are adding an Oracle database with a separate SQLNet Alias (TNS NAME) for each Oracle database user that you use in the application server environment.
The steps that follow are for experienced users. They document how you can install using a single SQLNet Alias.
To install using a single SQLNet Alias:
When adding a new database to the application server, do not enter the SQLNet Alias (TNS NAME) in the database name box; enter any name you want.
Now enter the user name and password as before and select Oracle 7 or Oracle 8 as the database platform.
jdbc:sssw:oracle:TNSNAME
replacing TNSNAME with the TNS NAME in your tnsnames.ora file.
You can now connect as many databases as you like using the same TNS NAME. Make sure you store the system tables separately.
What to avoid You can reduce the chance of encountering problems if you follow these rules:
Do not put anything else in the same Oracle database user as your SilverMaster.
Do not put multiple system tables in the same Oracle database user. These would conflict with each other. When adding multiple databases to the application server, you should keep their system tables separate.
Terminology differences Different DBMSs involve different terminology. The application server uses the term databases, but on Oracle these map to Oracle database users. The following table describes other differences.
Application server term |
Oracle term |
---|---|
SilverMaster database |
Oracle database user that owns the SilverMaster tables |
Add a database |
Add a specific user in an Oracle database |
The application server provides support for Oracle 8 and later synonyms for tables and views.
NOTE: With Oracle, you can also define synonyms for other kinds of objects, including object tables, object views, and stored procedures. The application server supports synonyms only for tables and views.
In order to enable synonym support, you need to specify one of the following driver sets when adding the Oracle database to the application server:
Thin Oracle JDBC driver with synonym/mixed case supportOracle's thin JDBC driver with synonym support
OCI Oracle JDBC driver with synonym/mixed case supportOracle's OCI driver with synonym support
Novell exteNd JDBC driver with synonym/mixed case supportthe Novell exteNd Oracle 8 driver with synonym support
Synonyms can be either private or public. A public synonym is owned by the special user group PUBLIC; every user of a database can access it.
A private synonym is in the schema of a specific user, who has control over its availability to others (see Oracle's Oracle 8 Concepts manual). Individual users can see only the public synonyms and their own private synonyms.
There is a property called includeSynonyms in the platforms.dbl file (in the application server's Resources directory) that specifies whether a driver supports synonyms. The property is in the PROPERTIES section for the driver.
DRIVER /Name ... /JdbcDriver ... /DriverSet ... ... PROPERTIES /includeSynonyms "true"
If you want to use one of these drivers but want synonym support disabled, set the includeSynonyms property to false. Similarly, if you have written your own Oracle driver and have implemented synonym support, to enable the support you need to set the includeSynonyms property to true in the PROPERTIES section for your driver.
This section describes the most common errors and workarounds.
ORA-01019 "unable to allocate memory in the user side" If you receive this message while running with a Net8 Oracle Client, free up available memory on the machine where the application server is installed.
ORA-01460 "unimplemented or unreasonable conversion requested" If you receive this message when SilverMasterInit is creating an Oracle SilverMaster or when you are attempting to add an Oracle database to your application server, you must upgrade to at least Version 8.0.4 of the Oracle client software. This problem occurs on versions before 8.0.4.
ORA-01631, 00000, "max # extents (%s) reached in table %s.%s" This message is caused when a table tried to extend past maxextents. To solve this problem, check your INITIAL, NEXT, and PCTINCREASE parameters on the DEFAULT TABLESPACE for the SilverMaster user. You must get your DBA to increase them. For example:
SELECT DEFAULT_TABLESPACE FROM dba_users WHERE username = 'MYUSER'; SELECT * FROM dba_tablespaces WHERE tablespace_name = 'MYTABLESPACE'; ALTER TABLESPACE MYTABLESPACE DEFAULT STORAGE (INITIAL 10K, NEXT 10K, PCTINCREASE 50);
ORA-01950, 00000, "no privileges on tablespace '%s'" This message is caused when a user does not have privileges to allocate an extent in the specified tablespace. To solve this problem, grant QUOTA to the user on the mentioned database. For example:
ALTER USER MYUSER QUOTA UNLIMITED ON MYTABLESPACE;
TNS-12154 "TNS: could not resolve service name" If you receive this message, you must verify that you have correctly created the SQL Net Alias as described in Create an Oracle SQL Net Alias.
Tablespaces for Oracle databases The installation will use the default tablespace of the user name/password specified for your SilverMaster database. You can usually set the default tablespace with the following SQL statement:
ALTER USER username DEFAULT TABLESPACE mytablespace ;
Adding large numbers of tables If you are planning to connect the application server to a large Oracle tablespace, open the Server Management Console (SMC) and change the value of the timeout for server requests to 30,000 seconds.
You must modify this value before attempting to add any large Oracle application. Once the application has been added successfully, reset the value back to the default value (3,000). The application server must be restarted for these changes to be applied.
For more information, see the section on setting performance parameters in the Administrator's Guide.
Using different database types with the same application server If you install with a non-Oracle SilverMaster and want to add an Oracle database, you need to have $ORACLE_HOME set and have $ORACLE_HOME/lib in your SHLIB_PATH (for HP-UX), LD_LIBRARY_PATH (for Solaris and Linux), or LIBPATH (for AIX).
Adding an Oracle 8i database on Solaris On Solaris, if you are not using an Oracle 8i database as your SilverMaster but are using Oracle 8i client software and want to add an Oracle 8i database to your server, you must copy a library file in the $EXTENDAPPSERVERROOT/bin directory. By default, the installed Oracle driver library file is appropriate for Oracle 8.
The following procedure will allow you to use the Oracle 8i library file instead:
Back up the libagora8_jni.so file:
# cd $EXTENDAPPSERVERROOT/bin # cp libagora8_jni.so libagora8_jni.so.orig
Copy the Oracle 8i driver library file:
# cp libagora8_jni.so.8i libagora8_jni.so
Connecting to Oracle from HP-UX or AIX If you are using the Novell exteNd Oracle driver, in order to connect to an Oracle database from HP-UX or AIX you must have at least the following Oracle components installed on the HP-UX or AIX machine:
In addition, during the Oracle installation process you will be asked if you want to relink Oracle product executables. You must answer yes. By default, the relinking will not occur.
If the Oracle installation is not sufficient for the application server, you will get the following error during SilverMasterInit:
/usr/lib/dld.sl: Unresolved symbol: opinit (code) from /home/username/exteNdAppServer/bin/libagora_jni.sl
If you encounter this error or another type of connection error, verify that you have installed the Oracle components listed above and can connect to your database using SQL*Plus.
Copyright © 2003 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...