Installation Guide



Chapter 9   Configuring Oracle Databases

This chapter describes how to configure your Oracle databases for use within the SilverStream Application Server environment as a SilverMaster or an application database.

    For the latest information on supported database versions, see the SilverStream Application Server release notes. In Windows, you can access the release notes from the SilverStream program group or from SilverStream online help.

This chapter includes these sections:

Setting up Oracle databases   Top of page

SilverStream connects to Oracle using a Type 2 JDBC driver written by and provided by SilverStream. This driver interfaces with the Oracle SQL Net Client to achieve connectivity to the Oracle Server.

You must have the Oracle SQL Net Client software loaded onto the SilverStream Server PC. Your version of the SQL Net client must not be 2.3.3.0.0 or you will experience problems when starting the SilverStream Server or when trying to run data-bound forms/views from the SilverStream Server. SilverStream recommends that you run with version 2.3.4.0.0 of the SQL Net client.

To configure an Oracle database for use as a SilverMaster or application database, you need to:

  1. Install the Oracle SQL Net client onto the machine where the SilverStream Server resides

  2. Create a SQL Net Alias for use by the SilverStream Server

  3. Create an Oracle Tablespace to hold the SilverMaster tables

  4. Create an Oracle User for the SilverStream Server

Once you have completed these tasks, you can install the SilverStream Server.

Step 1: Install Oracle SQL Net Client   Top of page

If version 2.3.4.0.0 of the Oracle SQL Net Client is not installed on the SilverStream Server machine, install it now before you continue. If you do not have this version of SQL Net, obtain it from Oracle Corporation.

Obtain the Oracle CD and 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.

Step 2: Create an Oracle SQL Net Alias   Top of page

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:

  1. Run SQL Net Easy Configuration from the Oracle for Windows NT Program Group, or for UNIX, run net8wiz.sh from the $Oracle_Home/bin/ directory.

  2. Choose Add a New Database Alias.

  3. Enter the name of the alias (you will need this name during the SilverStream Server installation).

    A suggested name for this alias is SilverMasterORCL.

  4. Choose TCP/IP as the protocol. Select OK to continue.

  5. Enter the TCP/IP Host Name for the Oracle Server and enter the correct Instance name.

  6. Choose OK to continue.

  7. Choose Yes to create the new alias. At this point, you can exit the SQL Net Easy Configuration utility.

  8. Test the newly created SQL Net Alias by using SQL Plus to connect to the Oracle database server.

Step 3: Create an Oracle Tablespace for use with SilverMaster   Top of page

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.

Step 4: Create an Oracle user for the SilverStream Server    Top of page

To connect the SilverStream Server to Oracle, create a new Oracle user for exclusive use by SilverStream. 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;

Creating a SilverStream application database on Oracle   Top of page

Adding an Oracle database to SilverStream equates to adding an Oracle Database User.

You use the SilverStream Designer Add Database option to make an existing database available as an application database. The Add Database option does two things:

Before adding Oracle databases   Top of page

Create a new unique SQL Net Alias, as outlined in the previous section.

Optional: If you want to store the SilverStream system tables in a separate database account, create an additional database user as described in the previous section and create a new Oracle SQL Net Alias. SilverStream system tables may also be stored in any other databases supported by SilverStream.

Database name

When adding an Oracle database to SilverStream you are asked for the name of the database. This 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.

SilverStream requires a unique database name. This means that SilverStream requires you to create a unique SQLNet Alias for each Oracle Database User you add.

That is, if you have SilverMaster, application tables, and the SilverStream system tables stored in three different Oracle Database Users then you need three unique SQLNet Aliases--one 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.

Adding a database   Top of page

If you already have data in an Oracle database, all you need to do for the SilverStream Server to recognize it is:

Using one SQLNet Alias   Top of page

This is an optional advanced feature. The Add Database steps describe how to add an Oracle database with a separate SQLNet Alias (TNS NAME) for each Oracle database user that you use in the SilverStream environment.

These steps are for experienced users. They document how you can install using a single SQLNet Alias:

To install using a single SQLNet Alias:

  1. When adding a new database to SilverStream, do not enter the SQLNet Alias (TNS NAME) in the database name box, enter any name you want.

  2. Now, enter the user name and password as before and select Oracle 7 or Oracle 8 as the database platform.

  3. Choose User-specified JDBC driver for the driver set.

  4. Click Next.

    You can now enter the JDBC connection string.

  5. For the JDBC URL, enter:

      jdbc:sssw:oracle:TNSNAME 

    replacing TNSNAME with the TNS NAME in your TNSNAMES.ORA file.

  6. You can now connect as many databases as you like using the same TNS NAME.

  7. Make sure you store the system tables separately.

What to avoid

You can reduce the chance of encountering problems if you follow these rules:

Terminology differences

Different databases use different terminology. The SilverStream terminology might be confusing for Oracle users. For example, SilverStream Database means Oracle Database User. SilverStream uses the word databases but on Oracle these map to Oracle Database Users. The following table describes other differences.

SilverStream term

Oracle term

SilverMaster Database

Oracle Database USER that owns the SilverMaster tables.

Add a database

Add a specific USER in an Oracle database.

Installation requirements for HP-UX and AIX   Top of page

Accessing an Oracle database on HP-UX

To access an Oracle database that resides on HP-UX, you must have at least the following Oracle components installed:

In addition, during the Oracle installation process you will be asked if you want to relink Oracle product executables. You must answer Yes to this question. By default, the relinking will not occur.

If the Oracle installation is not sufficient for SilverStream you will get the following error during SilverMasterInit:

  /usr/lib/dld.sl: Unresolved symbol: opinit (code) from /home/username/silverstream/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.

Accessing an Oracle 7 database on HP-UX or AIX

HP-UX and AIX users who want to connect to an Oracle 7 database either as a SilverMaster or application database must be using the following:

Troubleshooting   Top of page

This section describes the most common errors and a workaround if available.

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 SilverStream 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 SilverStream server, you must upgrade to at least Oracle 8.0.4 version 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 " Step 2: Create an Oracle SQL Net Alias".

Adding large numbers of tables

If you are planning on connecting SilverStream to a large Oracle tablespace, open the SilverStream Management Console and change the value of the timeout for server requests to 30,000 seconds (the default is 3,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 SilverStream 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.

SilverStream Server hangs

If the SilverStream Server hangs during server startup or when you try and test a data-bound form or view, check to see if you are running SQLNet Client version 2.3.3.0.0. SilverStream does not support this version of SQL Net and recommends that you upgrade the SQLNet client to 2.3.4. You can obtain this upgrade from Oracle Corporation.






Copyright © 2000, SilverStream Software, Inc. All rights reserved.