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:
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 220.127.116.11.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 18.104.22.168.0 of the SQL Net client.
To configure an Oracle database for use as a SilverMaster or application database, you need to:
Once you have completed these tasks, you can install the SilverStream Server.
If version 22.214.171.124.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.
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:
A suggested name for this alias is SilverMasterORCL.
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 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;
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:
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.
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.
If you already have data in an Oracle database, all you need to do for the SilverStream Server to recognize it is:
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:
You can now enter the JDBC connection string.
replacing TNSNAME with the TNS NAME in your TNSNAMES.ORA file.
What to avoid
You can reduce the chance of encountering problems if you follow these rules:
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.
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:
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:
WHERE username = 'MYUSER';
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 126.96.36.199.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.