7 Managing Oracle Database on Oracle Database Appliance

This chapter describes how to create and manage databases on Oracle Database Appliance. It also covers how to use Oracle Database Appliance solid-state drives (SSDs) and how to update and upgrade Oracle Database on Oracle Database Appliance.

Topics:

About the Oracle Database Appliance OAKCLI Utility

Manage and maintain Oracle Database Appliance components using the Oracle Appliance Manager Command-Line Utility (OAKCLI).

Oracle Database Appliance provides its own command-line tool, OAKCLI, to manage all components on the system. Use OAKCLI commands for the following tasks:

  • Create, upgrade, and patch databases

  • Create and upgrade Oracle homes

  • Create and modify database creation parameter files

Many tasks related to managing Oracle Databases are also required with databases on Oracle Database Appliance. Tasks common to Oracle Database generally are described in the Oracle Database documentation library. However, to simplify database creation and related tasks, use the OAKCLI utility. The OAKCLI utility combines the capabilities of the SYS database administrator role and the operating system Superuser (root user). Always perform administrative tasks using the OAKCLI utility.

Caution:

Do not use Oracle Database Configuration Assistant (DBCA) to create databases on Oracle Database Appliance. Only use Oracle Appliance Manager for database configuration. Deploying Oracle Database instances using Oracle Appliance Manager ensures that these databases are properly configured, optimized, and supported on Oracle Database Appliance.

Oracle Database Features and Oracle Database Appliance

Review the Oracle Database features that are available with Oracle Database Appliance.

Topics:

Data Migration and Management and Oracle Database Appliance

Oracle Database Appliance supports the use of standard Oracle Database loading and migration tools.

If you are loading data or migrating data from an existing database to Oracle Database Appliance, then you can use the standard Oracle Database loading and migration tools. These tools include the following:

  • Oracle GoldenGate

  • SQL*Loader

  • Oracle Data Pump

  • transportable tablespaces

  • RMAN

You can also use the RMAN utility to back up and recover databases on Oracle Database Appliance.

Oracle Clusterware and Oracle Database Appliance

Oracle Clusterware provides the clustering infrastructure for Oracle Database Appliance.

Oracle Clusterware provides the cluster technology required for Oracle Real Application Clusters (Oracle RAC). In addition, Oracle Clusterware manages applications and processes as resources that you register with Oracle Clusterware, to provide high availability services. The number of resources that you register with Oracle Clusterware to manage an application depends on the application. Applications that consist of only one process are usually represented by only one resource. More complex applications that use multiple processes or components can require multiple resources to maintain high availability.

Oracle RAC One Node and Oracle Database Appliance

Oracle RAC One Node is available with Oracle Database Appliance.

Oracle Real Application Clusters One Node (Oracle RAC One Node) is a single instance of an Oracle RAC database that runs on one node in a cluster. Instead of stopping and starting instances, you can use the Oracle RAC One Node online database relocation feature to relocate an Oracle RAC One Node instance to another server.

Administration of Oracle RAC One Node databases on Oracle Database Appliance is different from administering Oracle RAC or single-instance Oracle Databases. For Oracle RAC One Node databases, one node is the primary node, and the other node is a candidate node, which is available to accommodate services if the primary node fails, or is shut down for maintenance. The nodes, Oracle Databases, and database services reside in the generic server pool.

Oracle Real Application Clusters and Oracle Database Appliance

Oracle Database Appliance supports administrator-managed Oracle RAC Databases.

Oracle Real Application Clusters (Oracle RAC) provides technology that links two or more individual computers so that they function as one system. Oracle RAC deployed on Oracle Database Appliance enables each node to share access to a database. If one node fails or is taken offline, then the other node continues operating and the entire Oracle RAC database remains available.

Oracle Database Appliance currently supports only administrator-managed databases, where the database administrator allocates each instance of the database to a specific node in the cluster. Oracle Database Appliance does not support Policy-managed databases, where the database administrator defines the number of database instances required, but not the nodes where they run.

When you review the database resource for an administrator-managed database, you see a server pool defined with the same name as the Oracle Database. This server pool is part of a special Oracle-defined server pool, called the Generic server pool. The Generic server pool stores any server that is not in a top-level server pool and is not policy managed. Servers that host administrator-managed databases are statically assigned to the Generic server pool. Oracle RAC manages the Generic server pool to support administrator-managed databases. You cannot use SRVCTL or Oracle Clusterware Control (CRSCTL) utility commands to modify the Generic server pool.

Administrative Groups and Users on Oracle Database Appliance

Oracle Database Appliance configuration creates operating system groups and users whose members are granted system administration privileges on the appliance.

During configuration, two administrative accounts are created for Oracle Database Appliance: the user grid, with a user ID (UID) of 1000, and the user oracle, with a UID of 1001. The user grid is the Oracle Grid Infrastructure installation owner. The user oracle is the Oracle Database installation owner, and the owner of all Oracle Database homes (Oracle homes). By default, these users are members of operating system groups whose members are granted privileges to start up and administer Oracle Database and Oracle Automatic Storage Management.

The following table describes the Oracle system privileges groups, and information about the operating system authentication groups:

Table 7-1 Operating System Groups and Users on Oracle Database Appliance

Oracle System Privileges Group Name Group ID (GID) grid is a member oracle is a member
Oracle Inventory group (OINSTALL)

oinstall

1001

yes (primary group)

yes (primary group

OSDBA group

dba

1002

no

yes

OSOPER for Oracle RAC group

racoper

1003

yes

yes

OSDBA for ASM group

asmdba

1004

yes

yes

OSOPER for ASM group

asmoper

1005

yes

no

OSASM Group for Oracle ASM

asmadmin

1006

yes

no

If you create an initial database during deployment, then the password for the SYS and SYSTEM users is the same. Change this password for both users as soon as possible after configuration to prevent unauthorized access to your database using these privileged accounts.

Creating and Converting Databases with OAKCLI

Use the Oracle Appliance Manager Command Line Interface (OAKCLI) to create and manage databases on Oracle Database Appliance.

Topics:

About Creating Databases with OAKCLI Commands

Create additional Oracle Databases using the Oracle Appliance Manager Command-Line Utility (OAKCLI) to ensure that your database is configured optimally for Oracle Database Appliance.

OAKCLI assists you to deploy Oracle Databases that follow Optimal Flexible Architecture guidelines. The Optimal Flexible Architecture standard provides best practices configurations to help to ensure database deployments that are easier to support and maintain. Optimal Flexible Architecture includes the following

  • Structured organization of directories and files, and consistent naming for critical database files, such as control files, redo log files, and other critical files, which simplifies database administration.

  • Separation of tablespace contents to minimize tablespace free space fragmentation, and maximize administrative flexibility

  • Stripe and Mirror Everything (SAME) deployment, which safeguards against database failures

Refer to "Optimal Flexible Architecture" in Oracle Database Installation Guide for Linux for more information about Optimal Flexible Architecture.

Start the OAKCLI utility by using the command oakcli create database to create additional databases on Oracle Database Appliance.

When you run this command, respond to each prompt by entering the number that corresponds with the option you want to apply to your database. When a default is supplied, and the default is the value you want to use (typically shown as option 1), click Enter to accept that value. When there are many options, and the value you want is not displayed, press 0 to show all of the options.

Creating, Using, and Removing Database Configuration Files with OAKCLI

You can use OAKCLI to create and use configuration files to deploy databases on Oracle Database Appliance. Also use OAKCLI to remove unwanted configuration files.

Use the Oracle Appliance Manager Command-Line Utility (OAKCLI) ommand option oakcli create db_config_params to create a configuration file that you can use to configure multiple Oracle Database deployments. The command uses the following syntax, where params_file is the name of the configuration file that you want to create:

oakcli create db_config_params params_file

When you run oakcli create db_config_params, you are prompted to select one of a set of available parameter setting options to use in the configuration file. Respond to each prompt by entering the number that corresponds to the configuration that you want to use to set up your databases. If there is a default value, and you want to use this value (typically option 1), then press Enter to accept that value. If there are many options, then you may need to select option 0 to show all of the available parameter options.

To see your existing database configuration files, use the commandoakcli show db_config_params command. For example

# oakcli show db_config_params
Available DB configuration files are:
default
eurodbs
4kblockdbs
mytest.params

Configuration files using the default extension .dbconf do not show the extension in this command output. Oracle recommends that you use this default file extension to simplify file management. If you create a configuration file that does not use the .dbconf default extension, then the nondefault extension is shown as part of the output of oakcli show db_config_params.

To use a database configuration file to create a single Oracle Database, or to use the command to create many Oracle Database instances with the identical profile, use the following command syntax, where db_name is the name of the database that you want to create, and params_file is the name of the parameter configuration file that you want to use to configure the database:

oakcli create database -db db_name -params params_file

For example, this command creates the database named myxldb, using the parameter configuration file myxldb.dbconf:

oakcli create database -db myxldb -params myxldb.dbconf

After you have completed using configuration files, you can delete files that you do not plan to use again.

Remove unwanted database configuration files using the following command syntax, where params_file is the name of the parameter configuration file that you want to delete:

oakcli delete db_config_params params_file

As with other Oracle Database Appliance Manager commands related to database configuration files, you do not need to include the parameter configuration filename extension if your file has the default extension value, which is .dbconf.

Creating Snapshot Databases With OAKCLI

You can use OAKCLI to create snapshot databases.

An Oracle snapshot database is created by taking a snapshot of the Oracle ASM Cluster File System (Oracle ACFS) where the source data files reside. The source database can be a single instance, Oracle RAC, or Oracle RAC One Node. Compared to other methods of creating copies of databases, snapshot databases require less time and storage space and involve no downtime of the source database. Additionally, you can create any database type and class from any other type and class. For example, you can create an Oracle RAC database from an Oracle RAC One Node database. Similarly, you can create a database that is different in size than the source database.

On Oracle Database Appliance, you can create snapshot databases from any Oracle Database instance stored on Oracle ACFS. You can create snapshot databases with Oracle Database 11g release 2 (11.2.0.4) or later databases created or upgraded on the system.

Snapshot database candidates must meet the following requirements:

  • They must not be a standby or container database

  • They must not be running in read-only mode, or in restricted mode, or in online backup mode

  • They must be in ARCHIVELOG mode

  • They must have all defined data files available and online

  • They must not use centralized wallets with Transparent Data Encryption.

  • They must be deployed in ACFS storage

Also, ensure that the system clocks on the two Oracle Database Appliance nodes are synchronized before you create a snapshot database. If the clocks are significantly different, then the command can fail.

To create a snapshot database, use the command oakcli create snapshotdb. The following example creates a snapshot database named snapprod from the database named prod.

oakcli create snapshotdb -db snapprod -from prod

Caution:

Oracle Database Appliance does not support centralized wallets with Transparent Data Encryption. Recovery of encrypted data may fail in the snapshot database if the source database relies on an external, centralized wallet.

About Converting Single-Instance Databases to Oracle RAC or Oracle RAC One Node

Oracle provides utilities to enable you to convert your existing single-instance databases to Oracle Real Application Clusters or Oracle RAC One Node databases.

Use the procedures for converting your single-instance database as described in Oracle Real Application Clusters Administration and Deployment Guide. You can convert a single-instance database either to Oracle Real Application Clusters (Oracle RAC), or to Oracle RAC One Node.

For example, you can use RCONFIG to convert your single instance Oracle Database.

Open the template fileConvertToRAC_AdminManaged.xml, and modify it as required for your migration, in accordance with the instructions in the file. Then save the file with a new filename. The information you provide determines how your converted database is configured. The template file is located in the following path:

$ORACLE_HOME/sampleXMLs/ConvertToRAC_AdminManaged.xml

Refer to the section "Converting Single-Instance Oracle Databases to Oracle RAC and Oracle RAC One Node" in Oracle Real Application Clusters Installation and Configuration Guide for more information.

About Managing Multiple Databases on Oracle Database Appliance

Review this topic to understand Oracle requirements for multiple Oracle home support.

The Oracle home is the directory in which you install Oracle Database binaries, and from which Oracle Database runs. Use Oracle Appliance Manager OAKCLI commands to create and manage multiple Oracle homes and databases on Oracle Database Appliance. Oracle Database Appliance Manager automatically creates an Oracle Database Oracle home that is compliant with Oracle’s Optimal Flexible Architecture (OFA) standards.

Oracle Database Appliance supports multiple Oracle homes, including support of different release Oracle Database homes. Check the related readme files or the Release Notes to obtain information about the specific Oracle software releases supported for your Oracle Database Appliance platform.

When you use OAKCLI commands to create multiple homes on Oracle Database Appliance, the commands start the Oracle Grid Infrastructure cloning process. In Oracle Database Appliance deployments, the user oracle is the software installation owner account that owns the Oracle homes.

Note:

If you are not upgrading from an earlier release, then download the Oracle Database Appliance End-User Bundle for the Oracle Database version that you want to install.

Use OAKCLI commands to create, manage, patch, and upgrade multiple databases on Oracle Database Appliance. The command oakcli create database enables you to create a database with minimal user input. When you run this command without any additional options, the command creates a new database home. You can also create a database in an existing home by running the command oakcli create database -oh oracle_home, where oracle_home is the Oracle home in which you want to create the Oracle Database.

Caution:

Do not apply Oracle Database patches directly to Oracle Databases on Oracle Database Appliance. Only use Oracle Database Appliance patch bundles, which are tested to work across the whole software stack.

Only use oakcli commands to create new databases in either existing Oracle homes, or in new Oracle homes.

Downloading an End-User RDBMS Clone File

Download an Oracle Database Appliance End-User RDBMS Clone file onto your local machine to create a new database home.

This software clone file contains the Oracle Database software images for Oracle Database Appliance X6-2-HA.

There are no base clone files for 12.1.0.2.170117 or 11.2.0.4.161018. In an environment patched to at least Oracle Database Appliance 12.1.2.10.0, you can update the existing database to 12.1.0.2.170117, or 11.2.0.4.161018.

Perform the following steps to create new dbhomes for these releases:

  1. Download 12.1.0.2.170117, or 11.2.0.4.161018 clone file.

  2. Unpack the clone file with the command oakcli unpack -package.

  3. Create a new dbhome for 12.1.0.2.170117 or 11.2.0.4.161018.

    # oakcli create dbhome –version <version_number­­
    
  4. Create the databases for the new dbhome.

Before you transfer these files to Oracle Database Appliance, complete the hardware setup and configure the public network interface on Oracle Database Appliance.
  1. From an external client machine, log on to My Oracle Support.
  2. Select the Oracle Database Appliance End-User RDBMS Clone file (Patch) for the supported Oracle Database version.
    • 12.1.0.2.170117: Patch 19520042. Select 12.1.2.10.0 from the Release drop down box.
    • 11.2.0.4.161018: Patch 17770873. Select 12.1.2.9.0 from the Release drop down box.
  3. Click Download to download the zip file onto your external client.
  4. Use either a Secure Copy (scp) command or a USB storage device to copy the file from the external client to dom0 on Node 0. Use the /OVS directory as the target location.

    Note:

    If you use a USB drive to transfer the file, then format it first as FAT32, ext3, or ext4. NTFS file formats are not supported.

  5. When you extract the files, use the command oakcli unpack -package.

About Managing Multiple Database Instances Using Instance Caging

Use instance caging to manage your system resources on Oracle Database Appliance.

Oracle Database provides a method for managing CPU allocations on a multi-CPU server that runs multiple database instances. This method is called instance caging. Instance caging uses an initialization parameter to limit the number of CPUs that an instance can use simultaneously.

Instance caging and Oracle Database Resource Manager (the Resource Manager) work together to support your desired service levels across multiple instances. Consolidation can minimize idle resources, maximize efficiency, and lower costs.

Oracle Database Appliance templates are already tuned for the size of each database instance workload. They are designed to run on a specific number of cores. Instance caging ensures that each database workload is restricted to the set of cores allocated by the template, enabling multiple databases to run concurrently with no performance degradation, up to the capacity of Oracle Database Appliance. You can select database template sizes larger than your current needs to provide for planned growth.

Note:

Oracle strongly recommends that you use the Oracle Database Appliance templates, because they implement best practices and are configured specifically for Oracle Database Appliance.

The Oracle Database Appliance Manager interface refers to the database sizing templates as database classes.

By default, instance caging is not enabled on Oracle Database Appliance. To enable instance caging, set the initialization parameter, RESOURCE_MANAGER_PLAN, for each database on Oracle Database Appliance. The parameter specifies the plan to be used by the Resource Manager for the current instance. Setting this parameter directs the Resource Manager to allocate core resources among databases. If a plan is not specified with this parameter, then the Resource Manager and instance caging are not enabled.

Instance caging allocation of core resources is enabled in accordance with the Oracle Database Appliance database template size that you select for each database. The CPU_COUNT initialization parameter is set in the template. Use the CPU_COUNT setting that matches the size of each database to consolidate, and follow the standard instructions for configuring instance caging.

How to Upgrade and Update the Oracle Database on Oracle Database Appliance

Review the information in these topics to select the procedure for upgrading and updating your Oracle Database release.

Topics:

About Oracle Database Upgrades and Updates on Oracle Database Appliance

Use Oracle Database Appliance bundles to upgrade or update Oracle Database instances, as well as other components and features of Oracle Database Appliance.

Oracle Database Appliance upgrades and updates use specially developed Oracle Database Appliance patch bundles. Only use these patch bundles to perform upgrades and updates on Oracle Database Appliance.

Use the appropriate Oracle Database Appliance patch bundle for your appliance. Typically, Oracle recommends that you use the latest Oracle Database Appliance patch bundle.

Oracle Database Appliance patch bundles can include updates and upgrades to Oracle Database software, and updates and upgrades to other components of Oracle Database Appliance, including updates to Infrastructure (infra) and Grid Infrastructure (gi) components.

For information about Oracle Database Appliance Patch Bundles, known issues, and workarounds, see the Oracle Database Appliance Release Notes.

Updating to Oracle Database 12.1.0.2.161018 from Previous Oracle Database 12.1.0.2.x Releases

Use this example to understand steps required to update Oracle Database 12c release 1 (12.1) releases on Oracle Database Appliance.

You use Oracle Appliance Manager (OAKCLI) to update Oracle Database installations. In this scenario, you have updated two databases to Oracle Database 12c release 1 12.1.0.2.161018 when you ran the Oracle Database Appliance 12.1.2.6 Patch Bundle, but you have not updated two other Oracle Database instances that are patched at Oracle Database 12c release 1 (12.1.0.2.4). This procedure describes how to update databases manually after the patch bundle.

The Oracle Database Appliance Patch Bundle for Oracle Database uses a new numbering sequence. The Oracle Database update for Oracle Database Appliance Patch Bundle 12.1.2.6 is 12.1.0.2.161018.

  1. Run the command oakcli show databases on Node 0 only. Review the output of this command to confirm that you have databases with the appropriate release number for this update.

    The following example shows that there are four databases, db1, db2, db3, and db4:

    # oakcli show databases
    
    Name Type     Storage  HomeName         HomeLocation                              Version
    ---- ----     -------  --------         ------------                              -------
    db1 RAC        ACFS   OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1 12.1.0.2.4(20831110,20831110)
    db2 SINGLE     ACFS   OraDb12102_home2 /u01/app/oracle/product/12.1.0.2/dbhome_2 12.1.0.2.4(20831110,20831110)
    db3 RACOneNode ACFS   OraDb12102_home3 /u01/app/oracle/product/12.1.0.2/dbhome_3 12.1.0.2.160119(21948354,21948344)
    db4 RAC        ACFS   OraDb12102_home4 /u01/app/oracle/product/12.1.0.2/dbhome_4 12.1.0.2.160119(21948354,21948344)
    

    Note:

    In this example, the databases are in separate Oracle home locations. This option provides the ability to update individual databases, but requires more administration and storage allocation. Databases in separate homes must be updated individually.

    Databases in the same database home require less storage allocation, and can be updated as a group. However, you cannot update individual databases in a shared Oracle database home location.

  2. Run the command oakcli update -patch 12.1.2.9.0 --database on Node 0 only. When you run this command without specifying a database or a database home, the command automatically patches both nodes.

    If you have more than one database home that is a candidate for patching, then the command displays a selection list from which you can pick one, some, or all of the candidate database homes that you want to update.

  3. After the update command completes running, run the command oakcli show databases on Node 0 again.

    The command and output should now look similar to the following example:

    # oakcli show databases
     
    Name Type     Storage  HomeName         HomeLocation                               Version
    ---- ----     -------  --------         ------------                               -------
    db1 RAC        ACFS    OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1  12.1.0.2.161018(24927502,24340679)
    db2 SINGLE     ACFS    OraDb12102_home2 /u01/app/oracle/product/12.1.0.2/dbhome_2  12.1.0.2.161018(24927502,24340679)
    db3 RACOneNode ACFS    OraDb12102_home3 /u01/app/oracle/product/12.1.0.2/dbhome_3  12.1.0.2.161018(24927502,24340679)
    db4 RAC        ACFS    OraDb12102_home4 /u01/app/oracle/product/12.1.0.2/dbhome_4  12.1.0.2.161018(24927502,24340679)
    

    The Oracle Database instances db1 and db2 are now updated to 12.1.0.2.161018.

Upgrading to Oracle Database 12.1.x from Oracle Database 11.2.0.4.x Releases

Use this example to understand steps required to update Oracle Database 12c release 1 (12.1) releases on Oracle Database Appliance.

You use Oracle Appliance Manager (OAKCLI) to update Oracle Database installations. In this scenario, you are upgrading Oracle Database to a higher version, from 11g release 1 (11.2.0.4.170418) to 12c release 1 (12.1.0.2.170418).

While the target home in this example does show an existing database, having a database in the target home is not required. However, for debugging purposes it is recommended to create the target home with a sample RAC database to confirm the target binaries and home on both nodes work as expected. You can remove the RAC database after confirming the database functions as expected on each node. This example includes the steps for collecting diagnostics to review after a successful or failed upgrade.

Note:

Do not use manual database creation scripts, DBCA, or DBUA to upgrade your databases in Oracle Database Appliance. Instead, use the patches provided by Oracle Database Appliance to create and update your databases.

The existing database and database home, and the target database home must all be created using the Oracle Appliance Manager (oakcli) create commands and you must be a root user to upgrade the database.

  1. Run the command oakcli show dbhomes -detail on Node 0 only.
    Review the output of this command to confirm that you have databases with the appropriate release number for this update. The following example shows that there are two databases, db1 and db2
    [root@oda-n0 ~] # oakcli show dbhomes -detail  
    Oracle Home Name                     Oracle Home Version                     Oracle Home Location                               Database Name   Database Type 
    ----------------                     --------------------                  ---------------------------------         -------------  ----------- 
    OraDb11204_home1   11.2.0.4.170418(24732075,23054319)    /u01/app/oracle/product/11.2.0.4/dbhome_1     db1                RAC 
    OraDb12102_home1   12.1.0.2.170418(25171037,25942196)    /u01/app/oracle/product/12.1.0.2/dbhome_1     db2             RAC
    
  2. Set the ENV for the database home to be upgraded from source_home.
    1. Open the environment for the database home to be upgraded. This example is updating the database named db1 in Oracle Home OraDb11204_home1.

      # # . oraenv
      
    2. Choose the Oracle SID = database to be upgraded 

      ORACLE_SID = [root] ?  db1  
      

    You are now in the source home for the database to be upgraded.

    ...The Oracle base has been set to /u01/app/oracle...   
    [root@oda-n0 ~]#
    
  3. Use the oakcli upgrade database command to upgrade the database from the current database home to the target database home.
    In this example, we are upgrading db1 from OraDb11204_home1 to OraDb12102_home1.
    [root@oda-n0 ~]# oakcli upgrade database -db db1 -from OraDb11204_home1 -to OraDb12102_home1
    
  4. Review the output of the log file created by the oakcli upgrade database command.
    INFO: 2017...:07:23: Look at the log file '/opt/oracle/oak/log/oda0/tools/12.1.2.11.0/dbupgrade_16203.log' for more details
    
    Please enter the 'SYS' password : 
    Please re-enter the 'SYS' password: 
    INFO: 2017...07:52: Upgrading the database ll204. It will take few minutes. Please wait... 
    ... 
    ... 
    SUCCESS: 2017...22:21: Successfully upgraded the database db1
    
    Time to completion varies, depending on a number of factors, including the differences between the source version and target version.

    When the log file shows that the database is successfully upgraded, you can run a couple of checks to confirm the database upgrade.

  5. (Optional) Confirm the database upgrade.
    1. Run the command oakcli show databases on Node 0 and confirm that the database appears in the new home.
      In this example, we are upgrading db1 from OraDb11204_home1 to OraDb12102_home1.
      [root@oda-n0 ~]# oakcli upgrade database -db db1 -from OraDb11204_home1 -to OraDb12102_home1
      
    2. Log into SQLPLUS> as user ORACLE on the upgraded database to confirm that the upgrade scripts have been executed.
      # su - oracle  
      [oracle@oda-n0 bin]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1/  
      [oracle@oda-n0 bin]$ sqlplus
      
      
      SQL*Plus: Release 12.1.0.2.0 Production on Mon ... 2017  
      Copyright (c) 1982, 2014, Oracle. All rights reserved.
      
       Enter user-name: / as sysdba
       Connected to:  Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production 
       With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics  
      and Real Application Testing options
      
      SQL> col comp_name format a34  
      SQL> col status format a7 
      
       SQL> select comp_name,status, version from dba_registry;
       COMP_NAME                                        STATUS    VERSION
      ---------------------------------- -------  ------------------------------
      Oracle XML Database                 VALID   12.1.0.2.0
      Oracle Workspace Manager            VALID   12.1.0.2.0  
      Oracle Database Catalog Views       VALID   12.1.0.2.0  
      Oracle Database Packages and Types  VALID   12.1.0.2.0  
      Oracle Real Application Clusters      VALID   12.1.0.2.0
      
      SQL> select count(*) from dba_objects where status = 'INVALID';    -- Check for invalids and compile as needed
      

    If this is an Oracle RAC database, repeat this step on the second node (Node 1). If the checks are valid, the database is upgraded.

    If the checks are not valid or if there are any problems or failures during a database upgrade, submit a Service Request ticket and include the following information:
    • Log file created by the oakcli upgrade database command in Step 4.

    • All commands in clear text from setting the database home and . oraenv through the upgrade steps.

    • Oracle Trace File Analyzer (TFA) or oakcli manage diagcollect output from before the upgrade through the upgrade to completion or failure.

Upgrading to Oracle Database 11.2.0.4.161018 from Oracle Database 11.2.0.4.x Releases

Use this example to understand steps required to upgrade Oracle Database 11g release 2 (11.2) releases on Oracle Database Appliance.

You use Oracle Appliance Manager (OAKCLI) to upgrade Oracle Database installations. In this scenario, you have upgraded the Oracle Database Appliance infrastructure and Oracle Grid Infrastructure to Oracle Database Appliance Patch Bundle 12.1.2.6, but you have not upgraded Oracle Database installations. This procedure describes how to upgrade Oracle Database 11g release 2 (11.2) databases.

The Oracle Database Appliance Patch Bundle upgrade for Oracle Database uses a new numbering sequence. The Oracle Database upgrade for Oracle Database Appliance Patch Bundle 11.1.2.9 is 11.2.0.4.161018.

Before you start this procedure, you must complete the following tasks:

  • Completed running the Oracle Database Appliance 12.1.2.6 Patch Bundle for infrastructure and Oracle Grid Infrastructure.

  • Configured at least one Oracle Database Appliance database home for release 11.2.0.4.161018.

You configure an Oracle Database home using Oracle Appliance Manager, either as part of your patch bundle update initially, or as a manual procedure using the command oakcli create dbhome. You can run multiple Oracle Database instances on one Oracle Database home, to save storage space and obtain greater ease of management, or you can run Oracle Database instances in individual Oracle Database homes, for greater flexibility.

You must always have an Oracle Database Appliance database home for the database release to which you want to upgrade. In a new 12.1.2.9 deployment, a new 11.2.0.4.161018 Oracle Database home is set up for you automatically. If you are updating from an earlier release, then you must create at least one 11.2.0.4.161018 Oracle Database home manually using oakcli create dbhome.

  1. If necessary, download the 11.2.0.4.161018 RDBMS Clone Patch from My Oracle Support, and create an Oracle Database home on Node 0 for Oracle Database release 11.2.0.4.161018.

    For example:

    # /opt/oracle/oak/bin/oakcli create dbhome -version 11.2.0.4.161018

  2. Run the command oakcli show dbhomes.

    The output appears similar to the following example:

    Oracle HomeName  Oracle Home Version                Oracle HomeLocation                       Database Name    Database Type
    ---------------  -------------------                -------------                             -------------    -------------
    OraDb11204_home1 11.2.0.4.7(20760997,17592127)      /u01/app/oracle/product/11.2.0.4/dbhome_1 db1                    RAC
    
  3. Run the command oakcli show databases on Node 0 only. Review the output of this command to confirm that you have databases with the appropriate release number for this upgrade.

    The following example shows that there is one database,db1, which is a database that is not an upgraded from release 11.2.0.4, and that is patched to a level from which you can upgrade (11.2.0.4.7):

    # oakcli show databases
    
    Name Type     Storage  HomeName         HomeLocation                               Version
    ---- ----     -------  --------         ------------                               -------
    db1 RAC        ACFS    OraDb11204_home1 /u01/app/oracle/product/11.2.0.4/dbhome_1  11.2.0.4.7(20760997,17592127)
    
  4. Upgrade databases by running the command oakcli upgrade database on Node 0.

    Run the command on Node 0 only. Provide names of databases that you want to upgrade, and provide names of database homes where you want the upgraded databases placed. Run the command with the following options, where database is the name of the database that you want to upgrade, and dbhome is the name of the Oracle home where you want the upgraded database to be placed:

    oakcli upgrade database -db database -to dbhome

    The following example shows how to upgrade the database db1 identified in step 3 as an upgrade candidate, and how to place the upgraded database in the new database home, OraDb12102_home2, which is also identified in step 3:

    # oakcli upgrade database -db db1 -to dbhome12102_home2.

  5. After the upgrade command completes running, run the command oakcli show databases on Node 0 again.

    The command and output should now look similar to the following example:

    Name Type     Storage  HomeName         HomeLocation                               Version
    ---- ----     -------  --------         ------------                               -------
    db1 RAC        ACFS    OraDb12102_home2 /u01/app/oracle/product/12.1.0.2/dbhome_1  11.2.0.4.161018(24927502,24340679)  
    

    The database db1 is now in release 11.2.0.4, and the database home name is now OraDB12102_home2, which is in the path /u01/app/oracle/product/11.2.0.4/OraDb12102_home2.