Installation Guide


Chapter 10   Configuring Oracle Databases

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

    For the latest information on supported database versions, see the 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:

 
Top of page

Setting up Oracle databases

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 databound 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

The sections that follow explain these tasks.

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

 
Top of section

Step 1: Install Oracle SQL Net Client

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.

 
Top of section

Step 2: Create an Oracle SQL Net Alias

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.

    NOTE   On 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 specified this name during the SilverStream server installation).

    A suggested name for this alias is SilverMasterORCL.

  4. Choose TCP/IP as the protocol and 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.

 
Top of section

Step 3: Create an Oracle Tablespace for use with SilverMaster

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.

 
Top of section

Step 4: Create an Oracle user for the SilverStream server

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; 

 
Top of page

Creating a SilverStream application database on Oracle

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:

 
Top of section

Before adding Oracle databases

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 means that if you have SilverMaster, application tables, and the SilverStream system tables stored in three different Oracle Database Users, 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.

 
Top of section

Adding a database

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

 
Top of section

Using one SQLNet Alias

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.

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:

  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.

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:

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

 
Top of page

Installation requirements for HP-UX and AIX

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. 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:

 
Top of page

Using synonyms

The SilverStream server provides support for Oracle 8 synonyms for tables and views. You can see synonyms for tables and views in the SilverStream Designer's list of tables.

NOTE   With Oracle 8, you can also define synonyms for other kinds of objects, including object tables, object views, and stored procedures. SilverStream supports synonyms only for tables and views.

Specifying the driver   The default SilverStream driver set for Oracle 8--SilverStream JDBC driver--does not support synonyms.

In order to enable synonym support, you need to specify the driver set SilverStream JDBC driver with synonym/mixed case support when adding the Oracle 8 database to the SilverStream server.

Once you have chosen this driver set for an Oracle 8 database, synonyms defined for tables and views are displayed in the Designer's list of tables, as long as you have access to the synonyms, as described next.

Types of synonyms   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 the Oracle manual Oracle 8 Release 8.0 Concepts, Volume 1). Individual users can see only the public synonyms and their own private synonyms.

How synonyms behave   A synonym that displays in the table list behaves exactly like its underlying table or view--because support for synonyms is built into the JDBC method calls, which access the underlying tables and views to retrieve the required information.

The following JDBC implementation methods have synonym support built in: getTables, getTableTypes, getTablePrivileges, getColumnPrivileges, getPrimaryKeys, getImportedKeys, getExportedKeys, getCrossReference, and getIndexInfo.

Enabling and disabling synonym support   There is a property called includeSynonyms in the platforms.dbl file in the SilverStreamInstallDir/Resources directory that specifies whether a driver supports synonyms. The property is in the PROPERTIES section for the driver.

By default, the property is set to true for SilverStream JDBC driver with synonym/mixed case support.

  DRIVER
  /Name ...
  /JdbcDriver ...
  /DriverSet ...
  ...
  
  PROPERTIES
  /includeSynonyms       "true"

If you want to use this driver but want synonym support disabled, set the includeSynonyms property to false.

Similarly, if you have written your own Oracle 8 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.

 
Top of page

Troubleshooting

This section describes the most common errors and workarounds 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 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 Step 2: Create an Oracle SQL Net Alias.

Adding large numbers of tables   If you are planning to connect SilverStream to a large Oracle tablespace, open the SilverStream 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 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 to test a databound 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.


Installation Guide

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