Chapter 5. Logging into the Oracle Container Database 12c Release 2

This section focuses on ensuring once the Oracle RAC 12c Release 2 deployment is complete, the oracle user can successfully log into the Oracle container database (CDB), and ensure the Oracle database is using the allocated huge pages. The following steps provide the details.

The following example steps are done on node one of the Oracle RAC environment unless otherwise specified.

On node one of the Oracle RAC cluster,

  1. Set the environment variable for ORACLE_HOME with the location of the Oracle home. This reference environment sets ORACLE_HOME to /u01/app/oracle/product/12.2.0/dbhome_1

    $ export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
    $ echo $ORACLE_HOME
    /u01/app/oracle/product/12.2.0/dbhome_1
    Note

    As a precaution, ensure not to include a trailing forward slash (/) when exporting the ORACLE_HOME.

  2. Set the Oracle System ID (ORACLE_SID) used to identify the CDB database.

    $ export ORACLE_SID=cdb1
    $ echo ORACLE_SID
    cdb1
  3. Invoke the sqlplus binary to log into the Oracle instance as sysdba.

    $  $ORACLE_HOME/bin/sqlplus / as sysdba;
    
    SQL*Plus: Release 12.2.0.1.0 Production on Tue Sep 5 18:56:49 2017
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
  4. Verify the current value of the Oracle parameter use_large_pages

    SQL> show parameter use_large_pages;
    
    NAME                     TYPE    VALUE
    ------------------------------------ ----------- ------------------------------
    use_large_pages              string  TRUE
    Warning

    The following step requires that there is enough physical RAM on the system to place the entire SGA in large pages. If there is not enough RAM, the Oracle database instance won’t start. If there is not enough RAM within the nodes to place the entire SGA into large pages, leave the default setting and ignore the remaining steps within this section.

  5. Set the value of the Oracle parameter use_large_pages to the value of only

    SQL> alter system set use_large_pages=only scope=spfile sid='*';
    System altered.
  6. Shutdown the Oracle RAC database instances on all nodes and restart the instances on all nodes.

    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    
    
    SQL> startup;
    ORACLE instance started.
    
    Total System Global Area 3.1944E+10 bytes
    Fixed Size         30045256 bytes
    Variable Size        5637147576 bytes
    Database Buffers     2.6240E+10 bytes
    Redo Buffers           37060608 bytes
    Database mounted.
    Database opened.
  7. Verify the current value of the Oracle paramter use_large_pages is now set to only.

    SQL> show parameter use_large_pages;
    
    NAME                     TYPE    VALUE
    ------------------------------------ ----------- ------------------------------
    use_large_pages              string  ONLY
  8. Open the container database’s alert log, named alert_<name-of-cdb>.log, located under the $ORACLE_BASE/diag/rdbms/<name-of-cdb>/<name-of-cdb>/trace/ using a text editor, such as vi, and search for the following snippet to ensure that the System Global Area (SGA) is 100% in large pages.

    **********************************************************************
    2017-09-05T19:09:49.134349+00:00
    Dump of system resources acquired for SHARED GLOBAL AREA (SGA)
    
    2017-09-05T19:09:49.134648+00:00
     Per process system memlock (soft) limit = 30G
    2017-09-05T19:09:49.134810+00:00
     Expected per process system memlock (soft) limit to lock
     SHARED GLOBAL AREA (SGA) into memory: 30G
    2017-09-05T19:09:49.135130+00:00
     Available system pagesizes:
      4K, 2048K
    2017-09-05T19:09:49.135431+00:00
     Supported system pagesize(s):
    2017-09-05T19:09:49.135585+00:00
      PAGESIZE  AVAILABLE_PAGES  EXPECTED_PAGES  ALLOCATED_PAGES  ERROR(s)
    2017-09-05T19:09:49.135905+00:00
         2048K            15235           15234           15234        NONE
    2017-09-05T19:09:49.136094+00:00
     Reason for not supporting certain system pagesizes:
    2017-09-05T19:09:49.136253+00:00
      4K - Large pagesizes only
    2017-09-05T19:09:49.136405+00:00
    **********************************************************************
    Note

    This reference environment’s SGA size is set to 30 GB, however, this value varies depending on the value provided when creating an Oracle database using dbca.