Upgrade > Upgrade prerequisites > Oracle database

Oracle database

This section discusses information that is relevant to the Oracle database.

Required Oracle versions

If you have an existing Oracle database that you plan to use with the Model Repository, you must ensure that it is an Oracle version that is supported by SA 10.x as shown in the supported database section of the SA Compatibility Matrix. Also ensure that the Oracle database is configured.

Upgrading SA does not affect your existing Oracle installation. Fresh SA 10.60 installations will install Oracle 12c (12.1.0.2) if you choose to install the SA-supplied Oracle database for the Model Repository.

Required packages for Oracle12c

As of SA 10.1, Oracle 12c is shipped as the SA-supplied database. If your SA core is using an Oracle 11g database, you are not required to upgrade it. However, if you decide to upgrade your Oracle database to 12c from 11g, you must ensure that the new required packages are installed before upgrading the database.

Preparing the Oracle environment

You must ensure that the Oracle environment has been prepared as described below. If changes are required, you can either make the changes manually or use the SA-provided script described below.

Oracle parameters

Verify that the following initialization (init.ora) parameters are specified correctly. For parameters not listed, SA assumes that the default Oracle parameters are used:

Oracle 11.2.0.x
compatible := required to be >= 11.2.0
cursor_sharing := required to be = FORCE
db_file_multiblock_read_count := suggested to be >= 16
db_block_size := required to be >= 8192
deferred_segment_creation := required to be = FALSE
event := required to be = 12099 trace name context forever, level 1
job_queue_processes := required to be >= 1000
log_buffer := required to be >= 5242880
memory_target := required to be >= 1879048192 (1.75GB)
nls_length_semantics := required to be = CHAR
nls_sort := required to be = GENERIC_M
open_cursors := required to be >= 1500
optimizer_index_cost_adj := required to be = 20
optimizer_index_caching := required to be = 80
optimizer_mode := 'required to be = ALL_ROWS
processes := required to be >= 1024
recyclebin := required to be = OFF
remote_login_passwordfile := required to be = EXCLUSIVE
session_cached_cursors := required to be >= 50
undo_tablespace := should be = UNDO or other UNDO tablespace
undo_management := should be = AUTO
_complex_view_merging := required to be = FALSE

 

Oracle 12.1.0.x
compatible := required to be >= 12.1.0
cursor_sharing := required to be = FORCE
db_block_size := required to be >= 8192
db_file_multiblock_read_count := suggested to be >= 16
deferred_segment_creation := required to be = FALSE
job_queue_processes := required to be >= 1000
max_string_size := required to be = STANDARD
memory_target := required to be >= 2684354560 (2.5GB)
nls_length_semantics := required to be = CHAR
nls_sort := required to be = GENERIC_M
open_cursors := required to be >= 1500
optimizer_index_cost_adj := required to be = 100
optimizer_index_caching := required to be = 0
optimizer_mode := 'required to be = ALL_ROWS
processes := required to be >= 1024
recyclebin := required to be = OFF
remote_login_passwordfile := required to be = EXCLUSIVE
session_cached_cursors := required to be >= 50
undo_tablespace := should be = UNDO or other UNDO tablespace
The parameters _complex_view_merging and event are no longer required for Oracle 12c.

open_cursors value

The Oracle initialization parameter open_cursors must be set to 1000 or more for Oracle 11g. If you have an Oracle 12c database, the value must be 1500 or more.

New permissions required for database user opsware_admin

As of SA 10.0, the Oracle Export/Import utility is replaced by Oracle's Data Pump Export (expdp) and Import (impdp) utility. To accommodate the new utility, additional permissions are required for the database user opsware_admin. Therefore, prior to upgrading to SA 10.60, your DBA must grant the following permissions to the user opsware_admin.

  • grant create any directory to opsware_admin;
  • grant drop any directory to opsware_admin;

Script to fix Oracle parameters

If the parameters are not correct, you must run the change_init_ora.sh shell script on the Model Repository (truth)/Oracle database server before you upgrade the Model Repository. The shell script can be found in the following directory:

/<distro>/opsware_installer/tools

where <distro> is the full path to the distribution media. For example:

/<mountpoint>/hpsa-primary/disk001

You must run the script as a user with root privileges on the Oracle database.

Script usage:

# cd /<distro>/opsware_installer/tools

# ./change_init_ora.sh <oracle_home> <oracle_sid>

Oracle RAC

In an Oracle RAC environment, only one of the RAC nodes is used during the installation/upgrade process. The SA Installer connects to only one Oracle instance to modify the Model Repository. During normal SA operations, all the RAC nodes are used.

To accommodate the remote Model Repository install/upgrade process in Oracle RACed environment, the following two tnsnames.ora files are required on the SA server. By default, SA expects the tnsnames.ora file to be located in /var/opt/oracle

  • tnsnames.ora-install_upgrade

This copy of tnsnames.ora is used during SA installation/upgrade. The file can be renamed.

During the upgrade process, you can use soft links to point tnsnames.ora to tnsnames.ora-install_upgrade. During install-upgrade the installer connects to the database through only one RACed node.

The tnsnames.ora links can be changed as follows:

  1. Make sure that none of the clients are connected to the Oracle RACed database.
  2. Use soft links to point tnsnames.ora to tnsnames.ora-install_upgrade.

For example: $ln –s tnsnames.ora-install_upgrade tnsnames.ora

tnsnames.ora-operational

This copy of tnsnames.ora is used during normal SA operation. This file can be renamed.

After the SA upgrade is completed, change the soft link and point tnsnames.ora to tnsnames.ora-operational. During normal SA operation, the installer connects to the database through all the active RACed nodes.

The tnsnames.ora links can be changed as follows:

  1. Make sure that none of the clients are connected to the Oracle RACed database.
  2. Use soft links to point tnsnames.ora to tnsnames.ora-operational.

For example: $ln –s tnsnames.ora-operational tnsnames.ora

For more information, see the Oracle RAC support section.