2 Managing Oracle Database on Oracle Database Appliance

This chapter describes how to perform management tasks for Oracle Databases on Oracle Database Appliance. The chapter covers the following tasks:

Managing and Maintaining Oracle Database

Many tasks related to managing Oracle Databases, described in the Oracle Database documents on the Oracle Help Center page at http://docs.oracle.com, are also required with databases on Oracle Database Appliance. However, Oracle Database Appliance provides its own command line tool, Oracle Appliance Kit Command Line Interface, or OAKCLI, to manage all components on the system. This includes commands to create, upgrade, and patch databases; create and upgrade Oracle homes; create and modify database creation parameter files; and so on.

Additionally, because Oracle Database Appliance combines the capabilities of the database administrator role into its root user, database creation and related tasks are simplified and should always be performed using OAKCLI. See Chapter 5 for detailed syntax and usage information of all OAKCLI commands.

Oracle Enterprise Manager Database Control

The primary product for managing your database is Oracle Enterprise Manager Database Control (Database Control), a web interface. After you have installed Oracle Database, created or upgraded a database, and configured your network, use Database Control to manage your database. Database Control also provides an interface for performance advisors and for Oracle Database utilities such as SQL*Loader and Oracle Recovery Manager (RMAN).

See Also:

Oracle Database 2 Day DBA for an introduction to Database Control

Data Migration and Management

If you are loading data or migrating data from an existing database to Oracle Database Appliance, then you can use tools such as SQL*Loader, Oracle Data Pump, transportable tablespaces, and RMAN. You can also use the RMAN utility to back up and recover databases on Oracle Database Appliance.

See Also:

Oracle Database Backup and Recovery User's Guide and Oracle Database Backup and Recovery Reference for more information about Oracle Database backup and recovery capabilities, Oracle Database Utilities for information about data loading, and "Performing Oracle ASM Data Migration with RMAN" in Oracle Automatic Storage Management Administrator's Guide for an overview of how to migrate data to Oracle Automatic Storage Management (Oracle ASM).

Oracle Clusterware

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. 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 were built on multiple processes or components, might require multiple resources.

See Also:

Oracle Clusterware Administration and Deployment Guide for information about making applications highly available with Oracle Clusterware

Oracle RAC 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.

Oracle RAC One Node databases are administered slightly differently from 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, databases, and database services reside in the generic server pool.

See Also:

Oracle Real Application Clusters Administration and Deployment Guide for more information about administering Oracle RAC One Node

Oracle Real Application Clusters

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. To applications, each node appears as a single computer.

See Also:

Oracle Real Application Clusters Administration and Deployment Guide for information about administering Oracle RAC

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. Policy-managed databases, where the database administrator defines the number of database instances required, but not the nodes where they will run, are not available on Oracle Database Appliance.

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 Generic. Oracle RAC manages the Generic server pool to support administrator-managed databases. When you add or remove an administrator-managed database using either the Server Control utility (SRVCTL) or Oracle Database Configuration Assistant (DBCA), Oracle RAC creates or removes the server pools that are members of Generic. You cannot use SRVCTL or Oracle Clusterware Control (CRSCTL) utility commands to modify the Generic server pool.

See Also:

Oracle Clusterware Administration and Deployment Guide and Oracle Real Application Clusters Administration and Deployment Guide for more information about Oracle Clusterware and Oracle Real Application Clusters

Administrative Groups and Users

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 and the user oracle is the Oracle Database installation owner and the owner of all Oracle Database homes. By default, these users belong to groups shown in the following table.

Table 2-1 grid and oracle User Group Memberships

Group Name Group ID (GID) grid is member oracle is a Member

oinstall

1001

yes (primary group)

yes (primary group

dba

1002

no

yes

racoper

1003

yes

yes

asmdba

1004

yes

yes

asmoper

1005

yes

no

asmadmin

1006

yes

no


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

See Also:

Oracle Grid Infrastructure for Linux for information about operating system privileges groups and Oracle Automatic Storage Management Administrator's Guide for information about Oracle ASM system privileges

Creating and Converting Databases

This section describes the following tasks:

You should use Oracle Appliance Manager commands, described in Chapter 5, "Oracle Appliance Manager Command-Line Interface," to create and manage databases on Oracle Database Appliance. This will help you avoid using commands and parameters that could reduce the functionality of your databases, such as changing parameters associated with database file locations, including control_files, db_create_file_dest, db_recovery_file_dest, and so on.

Creating Databases with Oracle Appliance Manager Commands

Use the oakcli create database command 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 is the value you want to use, typically shown as option 1, then accept that value by pressing the Enter key. When there are many options, then you might need to press 0 to reveal all of the options if the value you want is not displayed.

See "oakcli create database" for more information.

Creating Database Configuration Files with Oracle Appliance Manager Commands

Use the oakcli create db_config_params -conf filename command to create a configuration file for configuring multiple databases on Oracle Database Appliance, where filename is the name of the configuration file that you generate.

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 is the value you want to use, typically shown as option 1, then accept that value by pressing the Enter key. When there are many options, then you might need to press 0 to reveal all of the options if the value you want is not displayed.

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

# oakcli show db_config_params 
Available DB configuration files are: 
default 
largedb
extralargedb
mytest.params

Note that only non-default extensions are included in the output, the default extension, .dbconf, is not shown.

To use a database configuration file to create a database, or many databases with identical profiles, use the oakcli create database command and include the -params -conf file_name option where file_name is the name of the required configuration file.

Remove unwanted database configuration files with the oakcli delete db_config_params -conf command, providing your configuration file name as the -conf parameter value. As with other Oracle Appliance Manager commands related to database configuration files, you do not need to include the extension if your file has the default extension value, which is .dbconf.

See Also:

"oakcli delete db_config_params" for more information about the command

Creating Snapshot Databases

An Oracle snapshot database is created by taking a snapshot of the ACFS file system where the source datafiles reside. The source database can be 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 stored on Oracle ASM Cluster File Systems (ACFS). Beginning with Oracle Database Appliance Release 12.1.2.0.0, this includes any Oracle Database Release 11.2.0.4 or later database created or upgraded on the system. Additional requirements for a database to be used as the source for a snapshot database include:

  • must not be a standby or container database

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

  • must be in ARCHIVELOG mode

  • must have all defined datafiles available and online

Also, ensure that the system clocks on the two Oracle Database Appliance nodes are synchronized before creating a snapshot database. To create a snapshot database, use the oakcli create snapshotdb command, as shown in the following example, which creates a snapshot database named snapprod from the database named prod.

oakcli create snapshotdb -db snapprod -from prod

Before issuing the command, ensure that the system clocks on the two Oracle Database Appliance nodes are synchronized. If the clocks are sufficiently different, the command may fail.

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.

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

Use the rconfig command line utility to convert a single-instance database to either Oracle RAC or Oracle RAC One Node. The contents of a ConvertToRAC_AdminManaged.xml file determine the type and other characteristics of the converted database.

See Also:

Appendix C, "Converting to Oracle RAC and Oracle RAC One Node from Single-Instance Oracle Databases" in Oracle Real Application Clusters Installation and Configuration Guide for instructions to convert a single-instance database.

Managing Multiple Databases on Oracle Database Appliance

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

Oracle Database Appliance supports multiple Oracle Homes including different versions for Oracle Database 11g Release 2, 11gR2 and Oracle Database Release 12c Release 1. The exact releases differ from version to version. Check the related Read Me files or Release Notes for specific versions.

See Also:

My Oracle Support note 888888.1, at https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=888888.1, for more details about the available database versions.

When you use oakcli commands to create multiple homes on Oracle Database Appliance, the commands start the cloning process used by Oracle Grid Infrastructure. In the current release, the user oracle owns all of 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. See Note 888888.1 for more details:

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=888888.1

Use oakcli commands to create, manage, patch, and upgrade multiple databases on Oracle Database Appliance using the multiple Oracle home feature. The oakcli create database command enables you to create a database with minimal user input. When used without any additional options, the command creates a new database home. Alternatively, create a database in an existing home by using the -oh option. Note that Oracle does not recommend applying RDBMS patches directly, you should only use Oracle Database Appliance Patch Bundles, which are tested to work across the whole software stack.

Note:

Use oakcli commands to create new databases in either existing Oracle homes or in new Oracle homes.

Managing Multiple Database Instances Using Instance Caging

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 and Oracle Database Resource Manager (the Resource Manager) collaborate 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 assures 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 could 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.

Tip:

Oracle Appliance Manager configurator refers to the database sizing templates as classes of databases.

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 Resource Manager for the current instance. Setting this parameter will direct Resource Manager to allocate core resources among databases. If no plan is specified with this parameter, then the Resource Manager is not enabled and instance caging will not be 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.

See Also:

Oracle Database Administrator's Guide for more information about enabling and configuring instance caging and the Resource Manager.

Using Oracle Database Appliance SSDs

Oracle Database Appliance includes SSDs to enhance the performance of certain operations. SSDs are used for:

Accelerating Redo Log Writes

Oracle Database Appliance contains four dedicated SSDs in slots 20-23 specifically for database redo logs. An ASM diskgroup named +REDO with High Redundancy is provisioned during the deployment process to accelerate database redo log write operations and improve latency. Databases automatically utilize these SSDs, and no other files can be hosted on them.

Caching Database Data

Oracle Database Appliance X5-2 introduces four additional 400 GB SSDs in slot numbers 16-19 that can be used to host database files, or they can be used as a database flash cache in addition to the buffer cache.

An ASM diskgroup named +FLASH with Normal Redundancy is provisioned on these SSDs. All of the storage in the +FLASH diskgroup is allocated to an ASM Dynamic Volume (flashdata), and formatted as an ACFS file system. Storage in this flashdata file system is then made available as an ACFS file system and is used to create database flash cache files that accelerate read operations. The file that contains the flash cache is automatically created for each database and is specified using the database init.ora parameter db_flash_cache_file. By default, flash_cache_file_size is set to 3 times the size of SGA, up to 196 GB, unless there is not enough space, in which case the size parameter is set to 0. Changing the flash_cache_file_size parameter requires restarting the database in order to use the newly sized flash cache.

See Also:

Oracle Database Administrator's Guide for information about Configuring Database Smart Flash Cache

Improving I/O Performance for Database Files

Oracle Appliance Manager configurator and the oakcli create database command provide the option to store entire databases in flash using the flashdata ACFS file system on the 400 GB SSDs (also used for the flash cache).

If there is not enough space available in flash, the oakcli create database command will not prompt you with an option to store databases in flash, and the databases files will automatically be created in the +DATA diskgroup. You can also store database data files on both flash and HDDs, but this must be manually managed. It requires a thorough understanding of database usage patterns and is only recommended for advanced administrators.

The limitations of this strategy are:

  • Oracle Database versions must be 11.2.0.4 or later

  • Database type must be OLTP

  • Only non-CDB databases can be completely stored in flash

  • There must be 160 GB of available space in the +FLASH diskgroup

See Also:

Upgrading Oracle Database on Oracle Database Appliance

To upgrade Oracle Database, use the appropriate Oracle Database Appliance Patch Bundle. Typically, you would perform infrastructure patching, then Grid Infrastructure patching, and then the Oracle Database patching. This section contains the instructions for applying each of the available database upgrade patches. These patches perform rolling upgrades that automatically patch Node 1 after patching Node 0. To upgrade Oracle Database, follow the steps in the sections that cover your specific upgrade requirements:

Upgrading to Oracle Database 11.2.0.3.12 from Previous Oracle Database 11.2.0.3.x Releases

  1. Run the oakcli show databases command, on Node 0 only, to confirm that you have a database with the appropriate release number for this upgrade. The command and output should look similar to the following example.

    # oakcli show databases
    Database Name     Database Type     Database HomeName
        Database HomeLocation                      Database Version
    tpcc              RAC               dbhome11203
        /u01/app/oracle/product/11.2.0.3/dbhome_1  11.2.0.3.2(13696216,13696251)
    EE                RACOneNode        dbhome11203
        /u01/app/oracle/product/11.2.0.3/dbhome_1  11.2.0.3.2(13696216,13696251)
    
  2. Run the oakcli update -patch 12.1.2.2.0 --database command on Node 0 only, the command automatically patches both nodes. If you have more than one database home that could be patched, then the software provides a select list from which you pick one, some, or all of the database homes to upgrade.

    Note:

    You cannot perform individual database upgrades from Release 11.2.0.3.x to 11.2.0.3.12. All databases running the homes that you upgrade, such as the two databases listed in the example in Step 1, will be patched to Oracle Database 11.2.0.3.12.
  3. After the command completes on both nodes, check your database version with the oakcli show databases command on Node 0. The command and output should now look similar to the following example.

    # oakcli show databases
    Database Name     Database Type     Database HomeName
        Database HomeLocation                      Database Version
    tpcc              RAC               dbhome11203
        /u01/app/oracle/product/11.2.0.3/dbhome_1  11.2.0.3.12(18522512,17592127)
    EE                RACOneNode        dbhome11203
        /u01/app/oracle/product/11.2.0.3/dbhome_1  11.2.0.3.12(18522512,17592127)
    

Upgrading to Oracle Database 11.2.0.3.12 from Oracle Database 11.2.0.2.x Releases

  1. Ensure that you have an 11.2.0.3.12 database home by completing the following actions on Node 0:

    • Run the command oakcli show dbhome. The output appears similar to the result in the following example.

      Oracle Home Name       Oracle Home version
                                   Home Location
      dbhome11202           11.2.0.2.5(13343424,13343447)
                                   /u01/app/oracle/product/11.2.0.2/dbhome_1
      OraDb112011_home1       11.2.0.3.12(18522512,17592127)
                                   /u01/app/oracle/product/11.2.0.11/dbhome_1
      

      If the output from the command includes an 11.2.0.3.12 home, as in the preceding example:, then continue with Step 2. However, your output may appear similar to the following, which has no 11.2.0.3.12 home listed:

      Oracle Home Name       Oracle Home version
                                   Home Location
      dbhome11202            11.2.0.2.5(13343424,13343447)
                                   /u01/app/oracle/product/11.2.0.2/dbhome_1
      

      If you do not have the required 11.2.0.3.12 home, then complete the following actions before proceeding to Step 2:

      • Download the 11.2.0.3.12 RDBMS Clone Patch 14777276 (file name p14777276_121200_Linux-x86-64.zip) from My Oracle Support.

      • Create an 11.2.0.3.12 database home on Node 0 with the following command:

        # opt/oracle/oak/bin/oakcli create dbhome -version 11.2.0.3.12
        
      • Return to the start of Step 1 and repeat the actions, beginning with the oakcli show dbhome command, until you have an 11.2.0.3.12 database home.

  2. Run the oakcli show databases command, on Node 0 only, to confirm that you have a database with the appropriate release number for this upgrade. The command and output should look similar to the following example, which shows three databases that are candidates to be upgraded.

    # oakcli show databases
    Database Name      Database Type     Database HomeName
        Database HomeLocation                       Database Version
    tpcc               RAC               dbhome11202
        /u01/app/oracle/product/11.2.0.2/dbhome_1   11.2.0.2.5(13343424,13343447)
    RACOne             RACOneNode        dbhome11202
          /u01/app/oracle/product/11.2.0.2/dbhome_1 11.2.0.2.5(13343424,13343447)
    EE                 SINGLE            dbhome11202
       /u01/app/oracle/product/11.2.0.2/dbhome_1    11.2.0.2.5(13343424,13343447)
    
  3. Upgrade a database by running the oakcli upgrade database command, on Node 0 only, providing the name of the database to upgrade and the 11.2.0.3.12 database home name from Step 1. The following example shows how to upgrade the tpcc database, listed in Step 2, using the OraDb11203_home1 identified in the example shown in Step 1:

    # oakcli upgrade database -db tpcc -to OraDb11203_home1
    
  4. After the command completes, verify your database version with the oakcli show databases command on Node 0 again. The command and output should now look similar to the following example:

    # oakcli show databases
    Database Name      Database Type     Database HomeName
        Database HomeLocation                       Database Version
    tpcc               RAC               OraDb11203_home1
        /u01/app/oracle/product/11.2.0.3/dbhome_1   11.2.0.3.12(18522512,17592127)
    RACOne             RACOneNode        dbhome11202
        /u01/app/oracle/product/11.2.0.2/dbhome_1   11.2.0.2.5(13343424,13343447)
    EE                 SINGLE            dbhome11202
        /u01/app/oracle/product/11.2.0.2/dbhome_1   11.2.0.2.5(13343424,13343447)