Category: Uncategorized

  • AWS – export and import using datapump utility.

    Introduction:
    AWS Import/Export is a service that accelerates transferring large amounts of data into and out of AWS using physical storage appliances, bypassing the Internet. AWS Import/Export supports transfers data directly onto and off of storage devices you own using the Amazon high-speed internal network.



    Refer http://docs.aws.amazon.com/AWSImportExport/latest/DG/whatisdisk.html

    Scenario 1: Take export dump  on AWS database Server for some of the schemas.

    Use following parfile to take export on aws database server

    directory=<directory name>
    dumpfile=<dumpfile name>
    logfile=<logfile name>
    schemas=<schema name>
    compression=all

    For example we are using AWSNSMP  database to take schemas export and keep the dumpfile on database server

    We need to use DATA_PUMP_DIR directory for keeping export dumpfile and logfiles.

    SQL> select name,open_mode from v$database;

    NAME      OPEN_MODE
    ——— ——————–
    AWSNSMP   READ WRITE

    SQL> select * from dba_directories;

    OWNER      DIRECTORY_NAME           DIRECTORY_PATH                 ORIGIN_CON_ID
    ———- ———————— —————————— ————-
    SYS        BDUMP                    /rdsdbdata/log/trace                       0
    SYS        ADUMP                    /rdsdbdata/log/audit                       0
    SYS        OPATCH_LOG_DIR           /rdsdbbin/oracle/Opatch                   0
    SYS        OPATCH_SCRIPT_DIR        /rdsdbbin/oracle/Opatch                   0
    SYS        DATA_PUMP_DIR            /rdsdbdata/datapump                        0
    SYS        OPATCH_INST_DIR          /rdsdbbin/oracle/OPatch                    0

    6 rows selected.

    1. Create Parfile and keep all parameters 

    vi AWSNSMP_WNL.par

    directory=DATA_DUMP_DIR
    dumpfile=bkp_AWSNSMP.dpdmp
    logfile=bkp_AWSNSMP.log
    schemas=STG_MTS_APP,STG_MTS_V,
    STG_MTS,
    STG_ENTRP_ADM2,
    STG_ENTRP_ADM2_V,
    STG_ENTRP_ADM2_RO,
    STG_ENTRP_ADM2_APP,
    STG_ENTRP_ADM1_APP,
    STG_ENTRP_ADM1,
    STG_ENTRP_ADM1_V,
    STG_ENTRP_ADM1_RO,
    STG_ENTRP_V,
    STG_ENTRP_RO,
    STG_ENTRP,
    STG_ENTRP_APP
    compression=all 

    2. Start export as follows.

    $ expdp parfile=AWSNSMP_WNL.par

    Export: Release 12.1.0.2.0 – Production on Wed Apr 26 02:28:27 2017

    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

    Username: system@AWSNSMP
    Password:  

    3. Monitor the export log from Database.

    Findout out file name by querying  RDSADMIN.RDS_FILE_UTIL.LISTDIR package from Database.

    SQL> select * from table(RDSADMIN.RDS_FILE_UTIL.LISTDIR(‘DATA_PUMP_DIR’)) order by mtime;

    FILENAME                                 TYPE         FILESIZE MTIME
    —————————————- ———- ———- ———
    bkp_AWSNSMP.dpdmp                         file         3051520  18-APR-17
    bkp_AWSNSMP.log                           file         12118    18-APR-17
    datapump/                                directory     4096     18-APR-17

    use following package to view the import logfile.

    SQL> select * from table
        (rdsadmin.rds_file_util.read_text_file(
            p_directory => ‘DATA_PUMP_DIR’,
            p_filename  => ‘datapump/bkp_AWSNSMP.log’));   2    3    4

    TEXT
    ——————————————————————————————————————————————————————————————————–
    ;;;
    Export: Release 12.1.0.2.0 – Production on Tue Apr 18 10:16:29 2017

    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
    ;;;
    Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
    Starting “SYSTEM”.”SYS_EXPORT_SCHEMA_01″:  SYSTEM/********@AWSNSMP directory=DATA_PUMP_DIR dumpfile=bkp_AWSNSMP.dpdmp logfile=bkp_AWSNSMP.log schemas=STG_MTS_APP,STG_MTS_V,STG_
    MTS,STG_ENTRP_ADM2,STG_ENTRP_ADM2_V,STG_ENTRP_ADM2_RO,STG_ENTRP_ADM2_APP,STG_ENTRP_ADM1_APP,STG_ENTRP_ADM1,STG_ENTRP_ADM1_V,STG_ENTRP_ADM1_RO,STG_ENTRP_V,STG_ENTRP_RO,STG_ENTRP,STG_ENTRP_APP compression=all encryption_password=********

    Estimate in progress using BLOCKS method…
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 28.62 MB
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT

    . . exported “STG_ENTRP_ADM2″.”RECORD_SEQ_POSITION”           0 KB       0 rows
    . . exported “STG_ENTRP_ADM2″.”REVINFO”                       0 KB       0 rows
    . . exported “STG_ENTRP_ADM2″.”SCHEDULED_FORM”                0 KB       0 rows
    . . exported “STG_ENTRP_ADM2″.”SIGNATURE”                     0 KB       0 rows
    . . exported “STG_ENTRP_ADM2″.”SIGNATURE_AUD”                 0 KB       0 rows
    . . exported “STG_MTS”.”MTS_DEPLOYMENT”                      0 KB       0 rows
    Master table “SYSTEM”.”SYS_EXPORT_SCHEMA_01″ successfully loaded/unloaded
    ******************************************************************************
    Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
      /rdsdbdata/datapump/bkp_AWSNSMP.dpdmp
    Job “SYSTEM”.”SYS_EXPORT_SCHEMA_01″ successfully completed at Tue Apr 18 14:16:51 2017 elapsed 0 00:00:16 

    Scenario 2: Perform export on local server from AWS database.

     Connect to any local database server.

    1.    Create directory to accommodate dumpfile and logfile.

    SQL> select * from dba_directories where directory_name like ‘%AWS%’;

    OWNER      DIRECTORY_NAME       DIRECTORY_PATH                         ORIGIN_CON_ID
    ———- ——————– ————————————– ————-
    SYS        AWS_PUMP_DIR         /mounts/nsgpr01_exports/exp/AWS                     0

    2.    Create database link.

    SQL> CREATE DATABASE LINK AWSNSMP_SYSTEM_LINK CONNECT TO SYSTEM IDENTIFIED BY  <password>  USING ‘AWSNSMP’;
    Database link created.

    3.    Create parfile and include network link parameter and encryption option.

    Vi AWSNSMP_NL.par
    directory=AWS_PUMP_DIR
    dumpfile=bkp_AWSNSMP.dpdmp
    logfile=bkp_AWSNSMP.log
    schemas=STG_MTS_APP,
    STG_MTS_V,
    STG_MTS,
    STG_ENTRP_ADM2,
    STG_ENTRP_ADM2_V,
    STG_ENTRP_ADM2_RO,
    STG_ENTRP_ADM2_APP,
    STG_ENTRP_ADM1_APP,
    STG_ENTRP_ADM1,
    STG_ENTRP_ADM1_V,
    STG_ENTRP_ADM1_RO,
    STG_ENTRP_V,
    STG_ENTRP_RO,
    STG_ENTRP,
    STG_ENTRP_APP
    compression=all
    NETWORK_LINK=AWSNSMP_SYSTEM_LINK encryption_password=*******

    4.    Initiate export.

    $ expdp parfile=AWSNSMP_NL.par

    Export: Release 12.1.0.2.0 – Production on Wed Apr 26 03:10:15 2017

    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

    Username:system
    Password

    5.    Monitor export log

    $ tail -f bkp_AWSNSMP.log

    ;;;
    Export: Release 12.1.0.2.0 – Production on Tue Apr 18 10:12:00 2017

    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
    ;;;
    Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
    Starting “SYS”.”SYS_EXPORT_SCHEMA_01″:  /******** AS SYSDBA parfile=AWSNSMP_NL.par
    Estimate in progress using BLOCKS method…
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 17.62 MB
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA

    . . exported “STG_ENTRP_ADM2″.”REVINFO”                       0 KB       0 rows
    . . exported “STG_ENTRP_ADM2″.”SCHEDULED_FORM”                0 KB       0 rows
    . . exported “STG_ENTRP_ADM2″.”SIGNATURE”                     0 KB       0 rows
    . . exported “STG_ENTRP_ADM2″.”SIGNATURE_AUD”                 0 KB       0 rows
    . . exported “STG_MTS”.”MTS_DEPLOYMENT”                      0 KB       0 rows
    Master table “SYS”.”SYS_EXPORT_SCHEMA_01″ successfully loaded/unloaded
    ******************************************************************************
    Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
      /mounts/nsgpr01_exports/exp/AWS/bkp_AWSNSMP.dpdmp
    Job “SYS”.”SYS_EXPORT_SCHEMA_01″ successfully completed at Tue Apr 18 10:14:21 2017 elapsed 0 00:02:18

    Scenario 3: Perform data load into AWS database using import.

    1.    Create database link on local server to communicate with aws database.

    SQL>CREATE DATABASE LINK AWSNSTN_SYSTEM_LINK CONNECT TO SYSTEM IDENTIFIED BY   ***** USING ‘AWSNSTN’;
    Database link created.

     
    2.    Transfer the dumpfile into aws database server:

    Refer below link for transfer file to AWS.
    http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Oracle.Procedural.Importing.html

    Use the following DBMS_FILE_TRANSFER.PUT_FILE to transfer file to aws Database server.
     
    set timing on
    set time on
    BEGIN
    DBMS_FILE_TRANSFER.PUT_FILE (
    source_directory_object        => ‘AWS_PUMP_DIR’,
    source_file_name               => ‘expdp_NSMPAC_schema.dmp’,
    destination_directory_object   => ‘DATA_PUMP_DIR’,
    destination_file_name          => ‘expdp_NSMPAC_schema.dmp’,
    destination_database           => ‘AWSNSTN_SYSTEM_LINK’);
    END;
    /

    Source_directory_object  –> local database directory where your dumpfile located
    Source_file_name –>      Dumpfile name
    destination_directory_object –> aws database directory where you need to place the dumpfile
    destination_database –> Database link

    3.    Monitor transfer of files from database.

    Issue following query to view the filename

    select * from table(RDSADMIN.RDS_FILE_UTIL.LISTDIR(‘DATA_PUMP_DIR’)) order by mtime;

    $ sqlplus

    SQL*Plus: Release 12.1.0.2.0 Production on Wed May 3 01:02:25 2017

    Copyright (c) 1982, 2014, Oracle.  All rights reserved.

    Enter user-name: SYSTEM@AWSNSTN
    Enter password:

    Last Successful login time: Tue May 02 2017 01:13:16 -04:00

    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

    SQL> select name,open_mode from v$database;

    NAME      OPEN_MODE
    ——— ——————–
    AWSNSTN   READ WRITE

    SQL> select * from table(RDSADMIN.RDS_FILE_UTIL.LISTDIR(‘DATA_PUMP_DIR’)) order by mtime;

    FILENAME                                           TYPE         FILESIZE MTIME
    ————————————————– ———- ———- ——————
    expdp_NSMPAC_schema.dmp                             file       2.0437E+10  18-APR-17
    impdp_NSMPAC_schema.log                             file       164046      18-APR-17
    datapump/                                          directory     4096      19-APR-17

    4.    create parfile for import with parallel parameter to speed up the import process.

    vi impdp_AWSNSTN_schemas.ctl
    directory=DATA_PUMP_DIR dumpfile=expdp_NSMPAC_schema.dmp logfile=impdp_NSMPAC_schema.log schemas=BRMGR01 transform=oid:n parallel=16

      
    5.    Start import in nohup and background

    nohup impdp SYSTEM/*****@AWSNSTN parfile=impdp_AWSNSTN_schemas.ctl &

    6.    Monitor import log from database.

    SQL> select * from table(RDSADMIN.RDS_FILE_UTIL.LISTDIR(‘DATA_PUMP_DIR’)) order by mtime;

    FILENAME                                           TYPE         FILESIZE MTIME
    ————————————————– ———- ———- ——————
    expdp_NSMPAC_schema.dmp                             file       2.0437E+10   18-APR-17
    impdp_NSMPAC_schema.log                             file       164046       18-APR-17
    datapump/                                          directory     4096       19-APR-17

    From above results you have file names,
    Use rdsadmin.rds_file_util.read_text_file to read import logfile

    SQL> select * from table
        (rdsadmin.rds_file_util.read_text_file(
            p_directory => ‘DATA_PUMP_DIR’,
            p_filename  => ‘datapump/impdp_NSMPAC_schema.log’));  2    3    4

    TEXT
    ———————————————————————————————————————————————————————————————————————————————————-
    ;;;
    Import: Release 12.1.0.2.0 – Production on Tue Apr 18 13:07:42 2017

    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
    ;;;
    Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
    Master table “SYSTEM”.”SYS_IMPORT_SCHEMA_01″ successfully loaded/unloaded
    Starting “SYSTEM”.”SYS_IMPORT_SCHEMA_01″:  SYSTEM/********@AWSNSTN parfile=impdp_AWSNSTN_schemas.ctl
    Processing object type SCHEMA_EXPORT/USER

    Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
    Processing object type SCHEMA_EXPORT/PROCEDURE/AUDIT_OBJ
    Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
    Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
    Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
    Job “SYSTEM”.”SYS_IMPORT_SCHEMA_01″ completed at Tue Apr 18 19:46:36 2017 elapsed 0 02:38:50

    2462 rows selected.

    Conclusion:
    In this preceding scenario based article  we have learned how to perform export from aws databases and import into aws databases from on-premises to AWS and vice versa.

    BY
    Name: Omer
    Designation: Senior Database Engineer
    Organization: Netsoftmate IT Solutions.
    Email: info@netsoftmate.com

  • Oracle Database Appliance (ODA) Standalone Configurator

    Oracle Database Appliance (ODA) Configurator: The standalone Oracle Appliance Manager (ODA) configurator is a Java-based tool that enables you to generate your ODA deployment plan and validate your network settings before the actual ODA deployment.


    ODA Configurator option:
     

    ODA Congigurator can be run in offline or online mode.

    Offline: Use the standalone ODA configurator to create an offline deployment plan and validate your network settings before the actual deployment.

    Online: You can configure your system at the time of deployment. In that case, you can use the online ODA Configurator which is part of the base Oracle Database Appliance software.

    You can run ODA Configurator before deployment by downloading the ODA Configurator on your local system which can be a Linux/UNIX, Windows or MAC system.

    If you choose to run the ODA Configurator in offline mode, you can save your deployment plan in a configuration file at the end of an offline configurator session. When the time comes for the actual deploy, copy the configuration file to ODA and run the online Oracle Appliance Configurator and import it to deploy your saved plan.


    Download ODA Configurator:

    • Enter the following URL in a web browser

    http://www.oracle.com/technetwork/database/database-appliance/overview/oda-configurator-1928685.html

    • Accept the license and click on desired ODA Configurator version. Here I am downloading ODA Manager Configurator 12.1.2.10



    • Enter the login credentials to begin the download



    • If you are using Chrome the download status is shown at the bottom of the browser.


    Running ODA Configurator:


    If you wish to use ODA Configurator before deployment, then you can download and run the ODA Configurator on your system runing Linux/UNIX, Window or MAC operating system.

    • Extract the ODA Configurator software

    On Window: Right Click and select Extract here
    On Linux/Unix: use unzip command to extract the files



    • To start the ODA Configurator

    On Windows: Double click the batch file config.bat
    On Linux/Unix: Use the command ./config.sh

    • The ODA Configurator welcome/home page looks like this

    Steps to Run ODA Configurator in Offline mode:

    • Start the ODA Configurator by double click config.bat on a Windows system (./config.sh on Linux).



    • On the welcome screen click next

    • On Configuration Type Screen you have various options:

    In Select Configuration Type, you can choose from “Typica (Recommended)”, “Custom” or “SAP Application”.
    Custom which will give you more flexibility to provide more information.

    In Select Environment, You choose “Bare Metal” (Physical) if you want to deploy a Physical setup or “Virtualized Platform” for Virtualization setup.

    In Select Hardware, you can choose the hardware you purchased. For Example: ODA-X5-2

    Use “Browse” button if you have existing configuration file the was created earlier using ODA Configurator.

    Click Next




    • On System Information screen, you can enter:

    “System Name” – this will be your prefix for Hostname, Interface, SCAN name and ILOM

    Select appropriate “Region” and “Timezone”
     

    “Database Backup Location” – You have “Internal” and “External” option. If you choose “Internal” the space will be used from DATA and RECO disk groups. Oracle will internally size DATA and RECO ASM disk group to 40% and 60% repectively.
     

    “Root password” – enter root password and confirm root password.
     

    Disk Group Redundancy – Select HIGH or Normal
     

    Accelerator Disk Group – select REDO or FLASH

    Click Next




    • On Generic Network screen, enter:

    Enter “Domain name” to be used
    Check the box if no DNS Server available.
    If you are using DNS and NTP server enter thier IPs.

    Click Next


    • On Public Network Screen:

    Enter the Node0 and Node1 IP, VIPs, SCAN IPs, Netmask and Gateway IP.
    Select bond0 for interface. This is the only choice.
    Enter ILOM IPs for ILOM0 and ILOM1, Netmask and Gateway IP

    Click Next




    • On Other Network Screen, enter:

    Enter the IPs for for Node0 and Node1 for net1, else click next to continue.

    Click Next




    • On Database Information screen, enter:

    If you don’t want to create an intial database uncheck the box and click next
    if you wish to create an initial database, check the box and fill the required information.
    “Database name” – Name for the database to be created
    “Is Container Database” – Choose true if you want to create a container database else false to create a regular (non-container database)
    “Database Type” – Choose from OLTP, DSS or In-Memory.
    “Database Class” – Choose from the 10 different database template that comes with ODA
    “Database Deployment” – Choose from RAC, RAC One Node or Enter Edition (Standalone)
    “Database Files on Flash Storage” – If you wish to store database in Flash disk select true

    Click Next




    • On Database Information Screen, Select:

    Database Language, Block Size, Characterset, Territory and National Character set.

    Click Next




    • On ASR Configuration Screen, Select:

    “Configure Internal Oracle ASR” – If you wish to configure ASR on ODA Server and enert the Proxy server name, port number and MOS credentails

    “Configure External Oracle AS” – If you wish to configure ASR on a separate server. Enter the ASR Manager Hostname or IP and port number.

    Select SNMP 2 for configuring ASR

    Note: If you don’t select to configure ASR now you can configure ASR post ODA deployment using oakcli commands

    Click Next




    • On CloudFS Information Screen:

    You can choose to configure ACFS file system called /cloudfs.

    Click Next




    • On Network Validation Screen:

    Click on “Run Validation” button to perform the network validation. It will ping every IP that has entered and attempts to resolve the names using DNS or /etc/hosts file.
    If you are running ODA Configuration on a server which is not ODA or not part of same subnet select “Skip Nework Configuration”

    Click Next




    • On the summary page:

    Click Save button to save to store the configuration in a text file.




    • Click Finish to exit the ODA Configuration application.





    Conclusion:
    In this article we have learned to run the Standalone Oracle Database Appliance configuration in offline mode. ODA configuration is a Java-based tool that enables you to generate your ODA deployment plan and validate your network settings before the actual ODA deployment.




  • Exadata Infiniband Switch Port Issue

    Some
    times we encounter Infiniband Port related issues. These alerts can be
    triggered from  from OEM or any other
    monitoring tools.

     

    Sample
    Alert from OEM 12c:
    Example
    1:
    Port xx on
    dm01sw-ib3.netsoftmate.com is disconnected from port xx
     

    Example
    2:
    Cable is present on Port xx but
    the port is disabled.
    This
    document provides the steps to resolve Infiniband Switch Port related issues
    mentioned above.
    Unless
    otherwise stated, run all the commands from compute node 1.
    Identify the Problematic Infiniband Switch Port

    • Using OEM 12c

    Log in to OEM 12c using web browser of your choice

    Click on Target à Exadata
    From the list select the appropriate Exadata
    Cluster
    From the left pain expand “IB Network”
    Select the Infiniband switch having problem.
    Now this will display the switch status. If there
    are any issues with the port it will mark in RED
    From the picture above we can see that there is an issue
    with Port 35 on Infiniband Switch “dm01sw-ib3”

    • Using IB Switch Commands

    Verify-Topology
    Oracle
    supplies a script/utility called /opt/oracle.SupportTools/ibdiagtools/verify-topology,
    with Exadata, which is used to validate InfiniBand network layout.
    Verify
    the InfiniBand topology using the following command from a database server or
    Exadata Storage Server:
    [root@dm01db01]# cd
    /opt/oracle.SupportTools/ibdiagtools/

    [root@dm01db01]#
    ./verify-topology

    Oracle
    Exadata Database Machine includes the verify-topology utility. This utility can
    be used to identify the following network connection problems:

    • Missing InfiniBand cable 
    • Missing InfiniBand connection
    • Incorrectly-seated cable 
    • Cable connected to the wrong endpoint
    [root@dm01db01]# cd
    /opt/oracle.SupportTools/ibdiagtools/



    [root@dm01db01]# ./verify-topology



           
    [ DB Machine Infiniband Cabling Topology Verification Tool ]


                   
    [Version IBD VER 2.d ]


    External non-Exadata-image nodes found:


    …will check for ZFS if on SSC – else ignore



    Found 2 leaf, 1 spine, 0 top spine switches



    Check if all hosts have 2 HCAs to different
    switches……………[SUCCESS]


    Leaf switch check: cardinality and even
    distribution…………..[SUCCESS]


    Spine switch check: Are any Exadata nodes
    connected …………..[SUCCESS]


    Spine switch check: Any inter spine switch
    links………………[SUCCESS]


    Spine switch check: Any inter top-spine switch
    links…………..[SUCCESS]


    Spine switch check: Correct number of
    spine-leaf links…………[SUCCESS]


    Leaf switch check: Inter-leaf link
    check……………………..[SUCCESS]


    Leaf switch check: Correct number of
    leaf-spine links………….[SUCCESS]

     In
    the example above, there are NO ERRORS reported.
     Listlinkup
    Run
    the listlinkup command to verify
    InfiniBand Port status enabled/disabled:
    Run
    this command on problematic Infiniband Switch.
    [root@dm01db01]# ssh
    root@dm01sw-ib3

    [root@dm01sw-ib3 ~]#
    listlinkup
    [root@dm01sw-ib3 ~]# listlinkup


    Connector 
    0A Not present


    Connector 
    1A Not present


    Connector 
    2A Not present


    Connector 
    3A Not present


    Connector 
    4A Not present


    Connector 
    5A Not present


    Connector  6A Present
    <-> Switch Port 35 is down (AutomaticHighErrorRate)


    Connector 
    7A Present <-> Switch Port 33 is up (Enabled)


    Connector 
    8A Present <-> Switch Port 31 is up (Enabled)


    Connector 
    9A Present <-> Switch Port 14 is up (Enabled)


    Connector 10A Present <-> Switch Port 16
    is up (Enabled)


    Connector 11A Present <-> Switch Port 18
    is up (Enabled)


    Connector 12A Not present


    Connector 13A Not present


    Connector 14A Present <-> Switch Port 07
    is up (Enabled)


    Connector 15A Not present


    Connector 16A Not present


    Connector 17A Present <-> Switch Port 01
    is up (Enabled)


    Connector 
    0B Not present


    Connector 
    1B Not present


    Connector 
    2B Not present


    Connector 
    3B Not present


    Connector 
    4B Not present


    Connector 
    5B Present <-> Switch Port 29 is up (Enabled)


    Connector 
    6B Not present


    Connector 
    7B Present <-> Switch Port 34 is up (Enabled)


    Connector 
    8B Not present


    Connector 
    9B Present <-> Switch Port 13 is up (Enabled)


    Connector 10B Present <-> Switch Port 15
    is up (Enabled)


    Connector 11B Present <-> Switch Port 17
    is up (Enabled)


    Connector 12B Not present


    Connector 13B Present <-> Switch Port 10
    is up (Enabled)


    Connector 14B Not present


    Connector 15B Not present


    Connector 16B Present <-> Switch Port 04
    is up (Enabled)


    Connector 17B Present <-> Switch Port 02
    is up (Enabled)
    There
    is an issue with port 32 on the Infiniband Switch “dm01sw-ib3”.
    This
    need to be addressed.
    Ibswitches
    Use
    this command to get the Infiniband switch LID number.
    [root@dm01sw-ib3
    ~]# ibswitches


    Switch  : 0x002128469deca0a0 ports 36 “SUN DCS
    36P QDR dm01sw-ib3 10.213.23.85” enhanced port 0 lid 3 lmc 0


    Switch  : 0x002128469e45a0a0 ports 36 “SUN DCS
    36P QDR dm01sw-ib2 10.213.23.84” enhanced port 0 lid 1 lmc 0
    Here
    the lid number for dm01sw-ib3 is 3.
    Ibportstate
    Use
    this command to identify the port state.
    [root@dm01sw-ib3
    ~]# ibportstate 3 35


    PortInfo:


    #
    Port info: Lid 3 port 35


    LinkState:…………………..Down


    PhysLinkState:……………….Disabled


    LinkWidthSupported:…………..1X
    or 4X


    LinkWidthEnabled:…………….1X
    or 4X


    LinkWidthActive:……………..4X


    LinkSpeedSupported:…………..2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkSpeedEnabled:…………….2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkSpeedActive:……………..2.5
    Gbps
    From
    the output above we can see that the port is diabled and the link speed is
    reduced.
    Getportstatus:
    Use this command to get the port status
    [root@dm01sw-ib3
    ~]# getportstatus 35


    Port
    status for connector 6A Switch port 35


    Adminstate:………………….Disabled
    (AutomaticHighErrorRate)


    LinkWidthEnabled:…………….1X
    or 4X


    LinkWidthSupported:…………..1X
    or 4X


    LinkWidthActive:……………..4X


    LinkSpeedSupported:…………..2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkState:…………………..Down


    PhysLinkState:……………….Disabled


    LinkSpeedActive:……………..2.5
    Gbps


    LinkSpeedEnabled:…………….2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    NeighborMTU:…………………4096


    OperVLs:…………………….VL0

    • Step to resolve the IB Port Issue

    Autodisable is a feature that can display the
    connectors in the presence of high error rates or suboptimal link speed or
    width.
    This feature doesn’t cause any issues, it just
    alerts customer with abnormal status of connectors.
    Autodisable feature has been introduced only in
    firmware 2.1 and does not apply to firmware 1.3.
    Correct way to account for this is to check and
    ensure whether any auto-disabled ports exist and if present then re-enable
    using enableswitchport –automatic ‘before’ up/downgrading fw to a different
    version. This will ensure compatible settings when moving between different fw.
    Problematic Inifiniband switch details:

    Switch name              :           dm01sw-ib3

    Firware verison        :           2.1.3-4

    Port number             :           35

    Lid number                :           3
    This solution for the Infiniband switch firmware
    verion “2.1.3-4”.
    To reenable an autodisabled connector or IB
    switch port, on the leaf switch dm01sw-ib3 do the following:
    [root@dm01sw-ib3
    ~]# enableswitchport –automatic Switch 35


    Enable
    connector 6A Switch port 35


    Adminstate:………………….Enabled


    LinkWidthEnabled:…………….1X
    or 4X


    LinkWidthSupported:…………..1X
    or 4X


    LinkWidthActive:……………..4X


    LinkSpeedSupported:…………..2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkState:…………………..Down


    PhysLinkState:……………….PortConfigurationTraining


    LinkSpeedActive:……………..2.5
    Gbps


    LinkSpeedEnabled:…………….2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    NeighborMTU:…………………4096


    OperVLs:…………………….VL0

    • Verify

     Now verify the port status using the following
    different commands.
    Ibportstate command
    [root@dm01sw-ib3
    ~]# ibportstate 3 35


    PortInfo:


    #
    Port info: Lid 3 port 35


    LinkState:…………………..Active


    PhysLinkState:……………….LinkUp


    LinkWidthSupported:…………..1X
    or 4X


    LinkWidthEnabled:…………….1X
    or 4X


    LinkWidthActive:……………..4X


    LinkSpeedSupported:…………..2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkSpeedEnabled:…………….2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkSpeedActive:……………..10.0
    Gbps


    Peer
    PortInfo:


    #
    Port info: Lid 3 DR path slid 65535; dlid 65535; 0,35 port 2


    LinkState:…………………..Active


    PhysLinkState:……………….LinkUp


    LinkWidthSupported:…………..1X
    or 4X


    LinkWidthEnabled:…………….1X
    or 4X


    LinkWidthActive:……………..4X


    LinkSpeedSupported:…………..2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkSpeedEnabled:…………….2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkSpeedActive:……………..10.0
    Gbps
    Getportstatus command
    [root@dm01sw-ib3
    ~]# getportstatus 35


    Port
    status for connector 6A Switch port 35


    Adminstate:………………….Enabled


    LinkWidthEnabled:…………….1X
    or 4X


    LinkWidthSupported:…………..1X
    or 4X


    LinkWidthActive:……………..4X


    LinkSpeedSupported:…………..2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    LinkState:…………………..Active


    PhysLinkState:……………….LinkUp


    LinkSpeedActive:……………..10.0
    Gbps


    LinkSpeedEnabled:…………….2.5
    Gbps or 5.0 Gbps or 10.0 Gbps


    NeighborMTU:…………………4096


    OperVLs:…………………….VL0

    Listlinkup command
    [root@dm01sw-ib3
    ~]# listlinkup


    Connector  0A Not present


    Connector  1A Not present


    Connector  2A Not present


    Connector  3A Not present


    Connector  4A Not present


    Connector  5A Not present


    Connector  6A Present <-> Switch Port 35 is up
    (Enabled)


    Connector  7A Present <-> Switch Port 33 is up
    (Enabled)


    Connector  8A Present <-> Switch Port 31 is up
    (Enabled)


    Connector  9A Present <-> Switch Port 14 is up
    (Enabled)


    Connector
    10A Present <-> Switch Port 16 is up (Enabled)


    Connector
    11A Present <-> Switch Port 18 is up (Enabled)


    Connector
    12A Not present


    Connector
    13A Not present


    Connector
    14A Present <-> Switch Port 07 is up (Enabled)


    Connector
    15A Not present


    Connector
    16A Not present


    Connector
    17A Present <-> Switch Port 01 is up (Enabled)


    Connector  0B Not present


    Connector  1B Not present


    Connector  2B Not present


    Connector  3B Not present


    Connector  4B Not present


    Connector  5B Present <-> Switch Port 29 is up
    (Enabled)


    Connector  6B Not present


    Connector  7B Present <-> Switch Port 34 is up
    (Enabled)


    Connector  8B Not present


    Connector  9B Present <-> Switch Port 13 is up
    (Enabled)


    Connector
    10B Present <-> Switch Port 15 is up (Enabled)


    Connector
    11B Present <-> Switch Port 17 is up (Enabled)


    Connector
    12B Not present


    Connector
    13B Present <-> Switch Port 10 is up (Enabled)


    Connector
    14B Not present


    Connector
    15B Not present


    Connector
    16B Present <-> Switch Port 04 is up (Enabled)


    Connector
    17B Present <-> Switch Port 02 is up (Enabled)
    Conclusion
    In this article we have learned various Infiniband Switch command to identify the port status and resolve the port related issues.

  • Exadata Infiniband Switch ILOM Snapshot

    When
    working with Oracle Support on a Infiniband Switch Hardware Service Request, Oracle
    Support request you to upload ILOM
    SNAPSHOT
    to properly assess the hardware failure. Starting
    with Exadata X4 and higher, you can now collect snapshot for Infiniband Switch
    using web browser interface. 

    In
    this article I will demonstrate the steps to collect ILOM snapshot data for an
    Infiniband Switch. You connect to Infiniband Switch using a web browser to
    collect the ILOM snapshot.

    Steps to collect ILOM Snapshot for IB Switch

    • Open
      a web browser (use something other than Internet Explorer) and enter the
      Infiniband Switch hostname.

    Note:
    There is NO *-ILOM* in the hostname.
    • Enter
      root as User Name and its password and click on Log In.

     

    Note:  You may see
    complaints about security – ignore or override – click I understand the
    risks/Add exception/Confirm Security Exception

    • Select
      Maintenance -> Snapshot



    • This
      will take you to the Server Snapshot Utility Page show below

     

    On the above Screen, Select Data Set “Normal”,
    Select Transfer Method as “Browser” and Click “Run”.

    Normal – Specifies
    that ILOM, operating system, and hardware information is collected.
    The download file will be saved
    according to your browser settings.
    Important Note:  Do not enable this option:Collect Only Log Files from Data Set‘. 
    Doing so will limit the snapshot to a much smaller sub-section of log files.

     

    • In the dialog box, specify the directory to which to save the file
      and the file name.

    Click OK. The file is saved to the specified directory.

     

    • Upload
      the zip to Oracle Support SR for review.

    Conclusion
    In
    this article we have learned how to collect the ILOM Snapshot diagnostic data
    for Infiniband Switch to investigate the hardware failure. It common that
    Oracle Support request you to upload ILOM snapshot for IB switch to investigate
    hardware issues.

     

  • Troubleshooting Exadata Infiniband Switch “Port xx has xx total errors”

    We received the following error message from OEM that port 36 on IB Switch dm01sw-iba01 has errors

    Alert message from OEM 12c:

    Host=dm01db01.netsoftmate.com
    Target type=Oracle Infiniband Switch
    Target name=dm01sw-iba01.netsoftmate.com
    Categories=Error
    Message=Port 36 has 10 total errors, crossed warning (10) or critical ( ) threshold.
    Severity=Warning
    Event reported time=May 29, 2017 2:11:14 AM CDT
    Target Lifecycle Status=Production


    Here are the few IB commands that can be used to identify the problem with IB Port.

    Troubleshooting steps:

    • Login to problematic IB switch using putty as root user

    login as: root
    root@dm01sw-iba01.netsoftmate.com’s password:
    Last login: Wed May 17 01:36:17 2017 from dm01db01.netsoftmate.com
    You are now logged in to the root shell.
    It is recommended to use ILOM shell instead of root shell.
    All usage should be restricted to documented commands and documented
    config files.
    To view the list of documented commands, use “help” at linux prompt.

     

    • Using listlinkup command to check the port status.

    [root@dm01sw-iba01 ~]# listlinkup
    Connector  0A Not present
    Connector  1A Not present
    Connector  2A Not present
    Connector  3A Not present
    Connector  4A Not present
    Connector  5A Not present
    Connector  6A Present <-> Switch Port 35 is up (Enabled)
    Connector  7A Present <-> Switch Port 33 is up (Enabled)
    Connector  8A Present <-> Switch Port 31 is up (Enabled)
    Connector  9A Present <-> Switch Port 14 is up (Enabled)
    Connector 10A Present <-> Switch Port 16 is up (Enabled)
    Connector 11A Present <-> Switch Port 18 is up (Enabled)
    Connector 12A Not present
    Connector 13A Present <-> Switch Port 09 is up (Enabled)
    Connector 14A Present <-> Switch Port 07 is up (Enabled)
    Connector 15A Present <-> Switch Port 05 is up (Enabled)
    Connector 16A Present <-> Switch Port 03 is up (Enabled)
    Connector 17A Present <-> Switch Port 01 is up (Enabled)
    Connector  0B Not present
    Connector  1B Not present
    Connector  2B Not present
    Connector  3B Not present
    Connector  4B Not present
    Connector  5B Not present
    Connector  6B Present <-> Switch Port 36 is up (Enabled)
    Connector  7B Present <-> Switch Port 34 is up (Enabled)
    Connector  8B Present <-> Switch Port 32 is down (Enabled)
    Connector  9B Present <-> Switch Port 13 is up (Enabled)
    Connector 10B Present <-> Switch Port 15 is up (Enabled)
    Connector 11B Present <-> Switch Port 17 is up (Enabled)
    Connector 12B Present <-> Switch Port 12 is up (Enabled)
    Connector 13B Present <-> Switch Port 10 is up (Enabled)
    Connector 14B Present <-> Switch Port 08 is up (Enabled)
    Connector 15B Present <-> Switch Port 06 is up (Enabled)
    Connector 16B Present <-> Switch Port 04 is up (Enabled)
    Connector 17B Present <-> Switch Port 02 is up (Enabled)

    From the above output we can see that port 36 is Enabled and there are no issues reported.

    • Using ibportstate and getportstatus IB commands to identify the port status

    First identify the lid number for the problematic IB Switch.
    Here the lid number for IB switch dm01sw-iba01 is 1.

    [root@dm01sw-iba01 ~]# ibswitches
    Switch  : 0x0010e0650e2ea0a0 ports 36 “SUN DCS 36P QDR dm01sw-iba01 10.21.50.2″ enhanced port 0 lid 1 lmc 0
    Switch  : 0x0010e0650d90a0a0 ports 36 “SUN DCS 36P QDR dm01sw-ibb01 10.21.50.3” enhanced port 0 lid 2 lmc 0

    [root@dm01sw-iba01 ~]# ibportstate 1 36
    PortInfo:
    # Port info: Lid 1 port 36
    LinkState:…………………..Active
    PhysLinkState:……………….LinkUp
    LinkWidthSupported:…………..1X or 4X
    LinkWidthEnabled:…………….1X or 4X
    LinkWidthActive:……………..4X
    LinkSpeedSupported:…………..2.5 Gbps or 5.0 Gbps or 10.0 Gbps
    LinkSpeedEnabled:…………….2.5 Gbps or 5.0 Gbps or 10.0 Gbps
    LinkSpeedActive:……………..10.0 Gbps
    Peer PortInfo:
    # Port info: Lid 1 DR path slid 65535; dlid 65535; 0,36 port 2
    LinkState:…………………..Active
    PhysLinkState:……………….LinkUp

    LinkWidthSupported:…………..1X or 4X
    LinkWidthEnabled:…………….1X or 4X
    LinkWidthActive:……………..4X
    LinkSpeedSupported:…………..2.5 Gbps or 5.0 Gbps or 10.0 Gbps
    LinkSpeedEnabled:…………….2.5 Gbps or 5.0 Gbps or 10.0 Gbps
    LinkSpeedActive:……………..10.0 Gbps

    [root@dm01sw-iba01 ~]# getportstatus 36
    Port status for connector 6B Switch port 36
    Adminstate:………………….Enabled
    LinkWidthEnabled:…………….1X or 4X
    LinkWidthSupported:…………..1X or 4X
    LinkWidthActive:……………..4X
    LinkSpeedSupported:…………..2.5 Gbps or 5.0 Gbps or 10.0 Gbps
    LinkState:…………………..Active
    PhysLinkState:……………….LinkUp
    LinkSpeedActive:……………..10.0 Gbps

    LinkSpeedEnabled:…………….2.5 Gbps or 5.0 Gbps or 10.0 Gbps
    NeighborMTU:…………………4096
    OperVLs:…………………….VL0-3

    From the above output we can see that port 36 is Enabled, linkstate is Active and there are no issues reported.

    • Using ibdiagnet command to identify the network quality and errors.

    [root@dm01sw-iba01 ~]# ibdiagnet
    Loading IBDIAGNET from: /usr/lib/ibdiagnet1.2
    -W- Topology file is not specified.
        Reports regarding cluster links will use direct routes.
    Loading IBDM from: /usr/lib/ibdm1.2
    -I- Using port 0 as the local port.
    -I- Discovering … 17 nodes (2 Switches & 15 CA-s) discovered.

    -I—————————————————
    -I- Bad Guids/LIDs Info
    -I—————————————————
    -I- skip option set. no report will be issued

    -I—————————————————
    -I- Links With Logical State = INIT
    -I—————————————————
    -I- No bad Links (with logical state = INIT) were found

    -I—————————————————
    -I- PM Counters Info
    -I—————————————————
    -I- No illegal PM counters values were found

    -I—————————————————
    -I- Fabric Partitions Report (see ibdiagnet.pkey for a full hosts list)
    -I—————————————————

    -I—————————————————
    -I- IPoIB Subnets Check
    -I—————————————————
    -I- Subnet: IPv4 PKey:0x0001 QKey:0x00000b1b MTU:2048Byte rate:10Gbps SL:0x00
    -W- No members found for group
    -I- Subnet: IPv4 PKey:0x7fff QKey:0x00000b1b MTU:2048Byte rate:10Gbps SL:0x00
    -W- No members found for group

    -I—————————————————
    -I- Bad Links Info
    -I- No bad link were found
    -I—————————————————
    —————————————————————-
    -I- Stages Status Report:
        STAGE                                    Errors Warnings
        Bad GUIDs/LIDs Check                     0      0
        Link State Active Check                  0      0

        Performance Counters Report              0      0
        Partitions Check                         0      0
        IPoIB Subnets Check                      0      2

    Please see /tmp/ibdiagnet.log for complete log
    —————————————————————-

    -I- Done. Run time was 15 seconds.



    From the above output we can see that there are no issues reported.



    Conclusion:
    In this article we have learned how to execute various IB Switch commands to identify the IB port errors or issues. 



  • Exadata Bundle Patching using Oplan utility

    What is oplan?

    Oplan utility helps you generate step by step patching instructions for your environment. Traditionally the patches are applied by using steps provided in the README file that comes with the patch.Oplan utility automatically generates the patching steps based on the target configuration information. It provides both patching and rollback steps and provides multiple patching options such as In-place and out-of-place methods.

    Download oplan utility?

    Download OPlan from My Oracle Support (https://support.oracle.com).
    Search for patch 6880880 and download.



    More on oplan utility
    Oracle Software Patching with OPLAN (Doc ID 1306814.1)   

    In this article I will demonstrate how to download and generate patching steps using oplan utility.

    oplan Steps
    Patching with oplan utility consists of following steps

    • Install oplan utility
    • Generate patching steps
    • Apply the patch
    • Rollback the patch
    Install oplan utility 
    • Steps to download oplan and latest Exadata Bundle Patch (QDPE)
    Note: In this article I am using oplan/opatch version 12.2.0.1.8 and BP October 2016 (24968615) for demonstration purpose.

     

    For downloading oplan:

    • Copy these patch using WINSCP to Node 1 (dm01db01) under /u01/app/oracle/software/bundle_patch

    dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:ls -ltr
    total 2099896
    -rw-r–r– 1 oracle oinstall   79808592 Jan 18 07:10 p6880880_122010_Linux-x86-64.zip
    -rw-r–r– 1 oracle oinstall 2068366687 Jan 18 09:48 p24968615_121020_Linux-x86-64.zip

    • Use dcli utility distribute OPLAN patche to all the nodes under /u01/app/oracle/software/bundle_patch/bundle_patch directory.
    dm01db01-orcldb1 {/u01/app/oracle/software}:dcli -g ~/dbs_group -l oracle ‘cd /u01/app/oracle/software; mkdir bundle_patch’
     
    dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g ~/dbs_group -l oracle -d /u01/app/oracle/software/bundle_patch -f p6880880_122010_Linux-x86-64.zip

    dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g ~/dbs_group -l oracle ls -l /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db01: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db02: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db03: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db04: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db05: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db06: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db07: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
    dm01db08: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip


    • Get the current opatch and oplan version
    RDBMS:

    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version’
    dm01db01: OPatch Version: 12.2.0.1.8
    dm01db01:
    dm01db01: OPatch succeeded.
    dm01db02: OPatch Version: 11.2.0.3.15
    dm01db02:
    dm01db02: OPatch succeeded.
    dm01db03: OPatch Version: 11.2.0.3.15
    dm01db03:
    dm01db03: OPatch succeeded.
    dm01db04: OPatch Version: 11.2.0.3.15
    dm01db04:
    dm01db04: OPatch succeeded.
    dm01db05: OPatch Version: 11.2.0.3.15
    dm01db05:
    dm01db05: OPatch succeeded.
    dm01db06: OPatch Version: 11.2.0.3.15
    dm01db06:
    dm01db06: OPatch succeeded.
    dm01db07: OPatch Version: 11.2.0.3.15
    dm01db07:
    dm01db07: OPatch succeeded.
    dm01db08: OPatch Version: 11.2.0.3.15
    dm01db08:
    dm01db08: OPatch succeeded.

    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan  -v’
    dm01db01: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
    dm01db01: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128M; support was removed in 8.0
    dm01db01:
    dm01db01: oplan version: 12.2.0.1.8
    dm01db01:
    dm01db01: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
    dm01db01: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
    dm01db01:
    dm01db02: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
    dm01db02:
    dm01db02: oplan version: 12.2.0.1.7
    dm01db02:
    dm01db02: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
    dm01db02: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
    dm01db02:

    dm01db08: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
    dm01db08:
    dm01db08: oplan version: 12.2.0.1.7
    dm01db08:
    dm01db08: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
    dm01db08: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
    dm01db08:

    GRID:

    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version’
    dm01db01: OPatch Version: 12.2.0.1.8
    dm01db01:
    dm01db01: OPatch succeeded.
    dm01db02: OPatch Version: 11.2.0.3.15
    dm01db02:
    dm01db02: OPatch succeeded.
    dm01db03: OPatch Version: 11.2.0.3.15
    dm01db03:
    dm01db03: OPatch succeeded.
    dm01db04: OPatch Version: 11.2.0.3.15
    dm01db04:
    dm01db04: OPatch succeeded.
    dm01db05: OPatch Version: 11.2.0.3.15
    dm01db05:
    dm01db05: OPatch succeeded.
    dm01db06: OPatch Version: 11.2.0.3.15
    dm01db06:
    dm01db06: OPatch succeeded.
    dm01db07: OPatch Version: 11.2.0.3.15
    dm01db07:
    dm01db07: OPatch succeeded.
    dm01db08: OPatch Version: 11.2.0.3.15
    dm01db08:
    dm01db08: OPatch succeeded.

    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan -v’
    dm01db01: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
    dm01db01:
    dm01db01: oplan version: 12.2.0.1.7
    dm01db01:
    dm01db01: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
    dm01db01: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
    dm01db01:
    dm01db02: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
    dm01db02:
    dm01db02: oplan version: 12.2.0.1.7
    dm01db02:
    dm01db02: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
    dm01db02: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
    dm01db02:


    dm01db08: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
    dm01db08:
    dm01db08: oplan version: 12.2.0.1.7
    dm01db08:
    dm01db08: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
    dm01db08: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
    dm01db08:
    dm01db01-orcldb1 {/home/oracle}:

    • Unzip OPATCH under ORACLE_HOME and GRID_HOME
    RDBMS:
     
    dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g dbs_group -l oracle ‘unzip -o /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0.2/dbhome’

    GRID:
     

    dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g dbs_group -l oracle ‘unzip -o /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip -d /u01/app/12.1.0.2/grid’

    • Verify both OPATCH and OPLAN are upgraded to the latest version
    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version | grep “OPatch Version”‘

    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan -v | grep -i “oplan version”‘

    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan  -v | grep -i “oplan version”‘

    dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version | grep -i “opatch version”‘

    Generate patching steps

    • Set the oracle home to GRID_HOME and run the oplan to generate apply steps for patching October 2016 BP
    dm01db01-orcldb1 {/home/oracle}:. oraenv
    ORACLE_SID = [orcldb1] ? +ASM1
    The Oracle base remains unchanged with value /u01/app/oracle

    dm01db01-+ASM1 {/home/oracle}:echo $ORACLE_SID
    +ASM1

    dm01db01-+ASM1 {/home/oracle}:echo $ORACLE_HOME
    /u01/app/12.1.0.2/grid

    dm01db01-+ASM1 {/home/oracle}:cd /u01/app/oracle/software/bundle_patch/

    dm01db01-+ASM1 {/u01/app/oracle/software/bundle_patch}:ls -ltr
    total 2099896
    -rw-r–r– 1 oracle oinstall 2068366687 Jan 18 09:48 p24968615_121020_Linux-x86-64.zip
    -rw-r–r– 1 oracle oinstall   79808592 Jan 23 07:40 p6880880_122010_Linux-x86-64.zip

    dm01db01-+ASM1 {/u01/app/oracle/software/bundle_patch}:unzip p24968615_121020_Linux-x86-64.zip

    dm01db01-+ASM1 {/u01/app/oracle/software/bundle_patch}:$ORACLE_HOME/OPatch/oplan/oplan generateApplySteps /u01/app/oracle/software/bundle_patch/24968615
     

    from oplan /u01/app/11.2.0.4/grid/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/11.2.0.4/grid/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/11.2.0.4/grid/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar

    Processing request…

    Review the log messages captured in the following file:

    /u01/app/11.2.0.4/grid/cfgtoollogs/oplan/2017-05-28-10-28-46/log.txt

    Success!

    Follow the instructions outlined in the following Installation Instructions document and

    patch your system:

    Apply Instructions (HTML)    : /u01/app/11.2.0.4/grid/cfgtoollogs/oplan/2017-05-28-10-28-46/ApplyInstructions.html
    Apply Instructions (TEXT)    : /u01/app/11.2.0.4/grid/cfgtoollogs/oplan/2017-05-28-10-28-46/ApplyInstructions.txt

    • The patch installation instructions specific to your target will be available as HTML and text format in these locations:
    Apply the patch
    • Choose the patching method based on the downtime and business requirement.
    • Follow the patching steps and apply the patch to the target environment.
    Rollback the patch
    • Follow the rollback step to rollback the patch from the target environment.
    Oplan Limitations:
    • Data Guard configurations are not supported.
    • Shared Oracle Home Configurations are not supported.
    • Single Instance Databases running in the same configuration are not supported

    Conclusion:
    In this article we have learned how oplan utility is used to generate patching steps. oplan makes patching simple and easy by generating step by step patching instructions. It offer multiple patching strategies such as In-place and Out-of-Place patching methods.
  • Resize Root File System On Exadata Compute Node

    Introduction

    By default Oracle ACS configure root file system with 30GB space on Exadata Computed nodes X2 and above. In most of the cases this space is sufficient to store operating system, Exadata software, log file and diagnostic files. Over time if you store patches, software and log files are not purged this space will be filled faster. Exadata X2 and above uses volume group and it is easy to extend the logical volume space on which the root file system is mounted.
    Root file system is created on two system partitions LVDb Sys1 and LVDb Sys2 and both system partitions must be size equally at the same time. Only one system partition is active at any time and other is inactive.
    In this article, I will demonstrate how you can extend root file system size on Exadata Compute nodes online without any downtime.

    Environemt

    Exadata X5-2 Half Rack
    Exadata storage software version 12.1.2.3.4

    Current Root File System Allocation

    [root@exa01db01 ~]# df -h /
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/VGExaDb-LVDbSys1
                           30G   25G  3.5G  88% /

     

    List Logical Volume and It’s Details

    lvm> lvs
    lvm> lvs -o lv_name,lv_path,vg_name,lv_size
      LV        Path                   VG      LSize
      LVDbOra1  /dev/VGExaDb/LVDbOra1  VGExaDb 200.00g
      LVDbSwap1 /dev/VGExaDb/LVDbSwap1 VGExaDb  24.00g
      LVDbSys1  /dev/VGExaDb/LVDbSys1  VGExaDb  30.00g
      LVDbSys2  /dev/VGExaDb/LVDbSys2  VGExaDb  30.00g
      perflv    /dev/VGExaDb/perflv    VGExaDb   5.00g


    Get the Current Active System Partition

    [root@exa01db01 ~]# imageinfo


    Kernel version: 2.6.39-400.294.1.el6uek.x86_64 #1 SMP Wed Jan 11 08:46:38 PST 2017 x86_64
    Image kernel version: 2.6.39-400.294.1.el6uek
    Image version: 12.1.2.3.4.170111
    Image activated: 2017-04-08 12:14:23 -0500
    Image status: success
    System partition on device: /dev/mapper/VGExaDb-LVDbSys1


    Steps to Increase Root File System on Compute Nodes:

    • Get the Current Root File System Utilization

    [root@exa01db01 ~]# df -h /

    Filesystem            Size  Used Avail Use% Mounted on

    /dev/mapper/VGExaDb-LVDbSys1
                           30G   25G  3.5G  88% /


    • Get Current Logical Volume Configuration

    lvm> lvs -o lv_name,lv_path,vg_name,lv_size

      LV        Path                   VG      LSize

      LVDbOra1  /dev/VGExaDb/LVDbOra1  VGExaDb 200.00g
      LVDbSwap1 /dev/VGExaDb/LVDbSwap1 VGExaDb  24.00g
      LVDbSys1  /dev/VGExaDb/LVDbSys1  VGExaDb  30.00g
      LVDbSys2  /dev/VGExaDb/LVDbSys2  VGExaDb  30.00g
      perflv    /dev/VGExaDb/perflv    VGExaDb   5.00g

    • Ensure Root File System Can be Resized Online

    [root@exa01db01 ~]# tune2fs -l /dev/mapper/VGExaDb-LVDbSys1 | grep resize_inode

    Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
    All Nodes:


    [root@exa01db01 ~]# dcli -g dbs_group -l root ‘tune2fs -l /dev/mapper/VGExaDb-LVDbSys1 | grep resize_inode’exa01db01: Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isizeexa01db02: Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isizeexa01db03: Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isizeexa01db04: Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize


    • Get the free space available in the Volume Group

    lvm> vgdisplay -s

      “VGExaDb” 1.63 TiB  [295.00 GiB used / 1.34 TiB free]

    • Extend both logical volumes using lvextend command. Here we are extending the root file system by 50GB, so the file system become 80GB in total.

    [root@exa01db01 ~]# lvextend -L +50G /dev/VGExaDb/LVDbSys1

      Size of logical volume VGExaDb/LVDbSys1 changed from 30.00 GiB (7680 extents) to 80.00 GiB (20480 extents).

      Logical volume LVDbSys1 successfully resized
    [root@exa01db01 ~]# lvextend -L +50G /dev/VGExaDb/LVDbSys2

      Size of logical volume VGExaDb/LVDbSys2 changed from 30.00 GiB (7680 extents) to 80.00 GiB (20480 extents).

      Logical volume LVDbSys2 successfully resized


    • Now resize the file system using resize2fs command.

    [root@exa01db01 ~]# resize2fs /dev/VGExaDb/LVDbSys1

    resize2fs 1.43-WIP (20-Jun-2013)

    Filesystem at /dev/VGExaDb/LVDbSys1 is mounted on /; on-line resizing required
    old_desc_blocks = 2, new_desc_blocks = 4
    Performing an on-line resize of /dev/VGExaDb/LVDbSys1 to 15728640 (4k) blocks.
    The filesystem on /dev/VGExaDb/LVDbSys1 is now 15728640 blocks long.
    [root@exa01db02 ~]# e2fsck -f /dev/VGExaDb/LVDbSys1

    e2fsck 1.43-WIP (20-Jun-2013)

    /dev/VGExaDb/LVDbSys1 is mounted.
    e2fsck: Cannot continue, aborting.


    The resize command ro LVDbSys2 is failed as it is inactive. So we must execute the fsck first before resizing.

    [root@exa01db01 ~]# resize2fs /dev/VGExaDb/LVDbSys2

    resize2fs 1.43-WIP (20-Jun-2013)

    Please run ‘e2fsck -f /dev/VGExaDb/LVDbSys2’ first.
    [root@exa01db01 ~]# e2fsck -f /dev/VGExaDb/LVDbSys2

    e2fsck 1.43-WIP (20-Jun-2013)

    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    /dev/VGExaDb/LVDbSys2: 122199/3932160 files (0.3% non-contiguous), 5496667/7864320 blocks

    Now execute the resize file system again

    [root@exa01db01 ~]# resize2fs /dev/VGExaDb/LVDbSys2

    resize2fs 1.43-WIP (20-Jun-2013)

    Resizing the filesystem on /dev/VGExaDb/LVDbSys2 to 15728640 (4k) blocks.
    The filesystem on /dev/VGExaDb/LVDbSys2 is now 15728640 blocks long.

    • Validate the root file system

    [root@exa01db01 ~]# df -h /

    Filesystem            Size  Used Avail Use% Mounted on

    /dev/mapper/VGExaDb-LVDbSys1
                           80G   25G   55G  31% /

     

    Conclusion

    In this article we have demonstrated how to resize root file system on Exadata Compute node online without any outage. It is important to note that root file system is create on two system partitions for high availability. 

  • Multiplex Oracle Database Controlfile in ASM

    Introduction:
    In Oracle databases, it is recommended to multiplex you controlfile to safeguard against different failures like corruption, accidentally removing control file and so on.

    In this article I will demonstrate how to multiplex/duplicating a controlfile into Automatic Storage Management (ASM).

    Current Setup

    Exadata 8-node RAC using ASM.
    Current controlfile is stored in ASM.
    Database is using SPFILE.
    There are diffferent ASM Disk Groups available such as DATA, RECO, DBFS_DG, ACFS_DG.
     
    dm01db01-orcldb1 {/home/oracle}:srvctl status database -d orcldb
    Instance orcldb1 is running on node dm01db01
    Instance orcldb2 is running on node dm01db02
    Instance orcldb3 is running on node dm01db04
    Instance orcldb4 is running on node dm01db05
    Instance orcldb5 is running on node dm01db07
    Instance orcldb6 is running on node dm01db06
    Instance orcldb7 is running on node dm01db03
    Instance orcldb8 is running on node dm01db08

    SQL> show parameter spfile

    NAME                                 TYPE        VALUE
    ———————————— ———– ——————————
    spfile                               string      +DATA/ORCLDB/PARAMETERFILE/spfile.431.939367673

    SQL> select name from v$controlfile;

    NAME
    ——————————————————————————–
    +DATA/ORCLDB/CONTROLFILE/current.384.939367517

    dm01db01-+ASM1 {/home/oracle}:asmcmd lsdg
    State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB   Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
    MOUNTED  NORMAL  Y         512             512   4096  4194304  10092544       424           315392         -157484              1             N  ACFS_DG/
    MOUNTED  NORMAL  Y         512             512   4096  4194304   7208960       532           225280         -112374              1             N  DATA/
    MOUNTED  HIGH    N         512             512   4096  4194304  12390400  12012736           450560         3854058              0             N  RECO/
    MOUNTED  NORMAL  N         512             512   4096  4194304   2106432   2104640            30528         1037056              0             Y  DBFS_DG/

    Steps to multiplex controlfile in ASM When Database is using SPFILE

    • Update the control_files to include the location for second control file.  The second controlfile is going to be created on different diskgroup RECO.

    SQL> alter system set control_files=’+DATA/ORCLDB/CONTROLFILE/current.384.939367517′,‘+RECO’ scope=spfile sid=’*’;

    System altered.

    • Stop and start the instance on node 1 in NOMOUNT state.

    dm01db01-orcldb1 {/home/oracle}:srvctl status database -d orcldb
    Instance orcldb1 is running on node dm01db01
    Instance orcldb2 is running on node dm01db02
    Instance orcldb3 is running on node dm01db04
    Instance orcldb4 is running on node dm01db05
    Instance orcldb5 is running on node dm01db07
    Instance orcldb6 is running on node dm01db06
    Instance orcldb7 is running on node dm01db03
    Instance orcldb8 is running on node dm01db08

    dm01db01-orcldb1 {/home/oracle}:srvctl stop database -d orcldb

    dm01db01-orcldb1 {/home/oracle}:srvctl status database -d orcldb
    Instance orcldb1 is not running on node dm01db01
    Instance orcldb2 is not running on node dm01db02
    Instance orcldb3 is not running on node dm01db04
    Instance orcldb4 is not running on node dm01db05
    Instance orcldb5 is not running on node dm01db07
    Instance orcldb6 is not running on node dm01db06
    Instance orcldb7 is not running on node dm01db03
    Instance orcldb8 is not running on node dm01db08

    dm01db01-orcldb1 {/home/oracle}:srvctl start instance -d orcldb -i orcldb1 -o nomount

    SQL> set lines 200
    SQL> select * from v$instance;

    INSTANCE_NUMBER INSTANCE_NAME    HOST_NAME                                                        VERSION           STARTUP_T STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT LOGINS     SHU
    ————— —————- —————————————————————- —————– ——— ———— — ———- ——- ————— ———- —
    DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO     CON_ID INSTANCE_MO EDITION FAMILY                                                                           DATABASE_TYPE
    —————– —————— ——— — ———- ———– ——- ——————————————————————————– —————
                  1 orcldb1          dm01db01                                  12.2.0.1.0        09-MAY-17 STARTED      YES          0 STOPPED                 ALLOWED    NO
    ACTIVE            UNKNOWN            NORMAL    NO           0 REGULAR     EE                                                                                       RAC

    • Connect to RMAN and duplicate the controlfile

    dm01db01-orcldb1 {/home/oracle}:rman target /

    Recovery Manager: Release 12.2.0.1.0 – Production on Tue May 9 05:07:45 2017

    Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

    connected to target database: ORCLDB (not mounted)

    RMAN> restore controlfile from ‘+DATA/ORCLDB/CONTROLFILE/current.384.939367517’;

    Starting restore at 09-MAY-17
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=372 instance=orcldb1 device type=DISK

    channel ORA_DISK_1: copied control file copy
    output file name=+DATA/ORCLDB/CONTROLFILE/current.384.939367517
    output file name=+RECO/ORCLDB/CONTROLFILE/current.1003.943506471
    Finished restore at 09-MAY-17

    RMAN> exit

    Recovery Manager complete.

    • update the control_file parameter with the full path and name.

    SQL> alter system set control_files=’+DATA/ORCLDB/CONTROLFILE/current.384.939367517′,’+RECO/ORCLDB/CONTROLFILE/current.1003.943506471′ scope=spfile sid=’*’;

    System altered.

    • Shutdown and start database

    SQL> shutdown immediate;
    ORA-01507: database not mounted

    ORACLE instance shut down.
    SQL> exit

    dm01db01-orcldb1 {/home/oracle}:srvctl start database -d orcldb

    dm01db01-orcldb1 {/home/oracle}:srvctl status database -d orcldb
    Instance orcldb1 is running on node dm01db01
    Instance orcldb2 is running on node dm01db02
    Instance orcldb3 is running on node dm01db04
    Instance orcldb4 is running on node dm01db05
    Instance orcldb5 is running on node dm01db07
    Instance orcldb6 is running on node dm01db06
    Instance orcldb7 is running on node dm01db03
    Instance orcldb8 is running on node dm01db08

    • verify that both controlfiles are in ASM now.

    SQL> select name from v$controlfile;

    NAME
    ——————————————————————————–
    +DATA/ORCLDB/CONTROLFILE/current.384.939367517
    +RECO/ORCLDB/CONTROLFILE/current.1003.943506471

    SQL> show parameter control_files

    NAME                                 TYPE        VALUE
    ———————————— ———– ——————————
    control_files                        string      +DATA1/ORCLDB/CONTROLFILE/current.384.939367517, +RECO/ORCLDB/CONTROLFILE/current.1003.943506471

    Conclusion
    In this article we have learned how to duplicate a control file in ASM. Multiplexing control file is recommended to safeguard against controlfil failures.

  • Exadata: Install Oracle GoldenGate 12c using ACFS File System

    Overview
    You can install Oracle GoldenGate for Oracle RAC using:

    • Shared Storage
      •  NFS, OCFS2, DBFS, OCFS
    • Local file system
    You can Install Oracle GoldenGate 12c in 2 ways:

    • Graphical User Interface (GUI)
    • Using response file (Silent)

    In this article I will demonstrate how to Install Oracle GoldenGate 12c using GUI on a full Rack Exadata Database Machine using ACFS file system.

    What is ACFS?
    Automatic Storage Management Cluster File System (ACFS) was introduced in Oracle database 11gR2. ACFS is a general purpose single-node or cluster file system on top of ASM. ACFS can be accessed using industry-standard Network Attached Storage (NAS) file access protocols: Network File System (NFS) and Common Internet File System (CIFS)

    Installing GoldenGate on ACFS
    ACFS file systems are mounted on all nodes in a cluster. Oracle GoldenGate is supported in an Oracle ACFS environment. GoldenGate should be installed in the cluster to capture the data from the database.

    How to configure ACFS?
    Take a look at the below 2 articles on how to configure ACFS on Exadata Database Machine.
     

    Flex ASM: http://netsoftmate.blogspot.in/2017/03/configure-acfs-on-exadata-running.html
    Standard ASM: http://netsoftmate.blogspot.in/2017/02/configure-acfs-on-exadata-database.html

    Environment:

    • Exadata Database Machine X5-2 Full Rack
    • Oracle GoldenGate 12.2.0.1
    • Oracle Database 12.2.0.1
    • ASM Cluster File System (ACFS)
    Verify ACFS is running and mounted

    dm01db01-+ASM1 {/home/oracle}:/u01/app/12.2.0.1/grid/bin/crsctl stat res ora.acfs_dg.acfsvol.acfs -t
    ——————————————————————————–
    Name           Target  State        Server                   State details
    ——————————————————————————–
    Local Resources
    ——————————————————————————–
    ora.acfs_dg.acfsvol.acfs
                   ONLINE  ONLINE       dm01db01                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db02                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db03                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db04                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db05                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db06                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db07                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db08                 mounted on /acfs_ogg
                                                                 ,STABLE
    ——————————————————————————–

    dm01db01-+ASM1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘df -h /acfs_ogg’
    dm01db01: Filesystem            Size  Used Avail Use% Mounted on
    dm01db01: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db02: Filesystem            Size  Used Avail Use% Mounted on
    dm01db02: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db03: Filesystem            Size  Used Avail Use% Mounted on
    dm01db03: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db04: Filesystem            Size  Used Avail Use% Mounted on
    dm01db04: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db05: Filesystem            Size  Used Avail Use% Mounted on
    dm01db05: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db06: Filesystem            Size  Used Avail Use% Mounted on
    dm01db06: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db07: Filesystem            Size  Used Avail Use% Mounted on
    dm01db07: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db08: Filesystem            Size  Used Avail Use% Mounted on
    dm01db08: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg

    Steps to Download Oracle GoldenGate 12c Software

    • Open a web browser and enter www.oracle.com in the address bar
    • This will bring you to the Oracle website home page
    • On this page hover on the download tab and click on “middleware”
    • Click GoldenGate
    • Accept the agreement and select the desired Oracle GoldenGate version for your platform.
      • Here I am downloading “Oracle GoldenGate 12.2.0.1.1 for Oracle on Linux x86-64”
    • Copy the zip file from your desktop to Exadata Compute node 1 using WinScp
    • Drag and Drop the file from left to right in to a directory
      • Here I am copying the file to /u01/app/oracle/software location
    • File copy is in progress
    Steps to Install Oracle GoldenGate 12c software using OUI (Graphical Interface)
    • Login to Exadata Compute node 1 as Oracle software owner and navigate to the Oracle GoldenGate staging location
    dm01db01-orcldb1 {/home/oracle}:cd /u01/app/oracle/software

    dm01db01-orcldb1 {/u01/app/oracle/software}:ls -ltr
    total 464928
    -rw-r–r– 1 oracle oinstall 475611228 Jan  2 04:51 fbo_ggs_Linux_x64_shiphome.zip

    • Copy software zip file to ACFS location /acfs_ogg
    dm01db01-orcl1 {/u01/app/oracle/software}: cp fbo_ggs_Linux_x64_shiphome.zip /acfs_ogg/
    • Unzip the Oracle GoldenGate 12c software
    dm01db01-orcldb1 {/u01/app/oracle/software}: cd /acfs_ogg

    dm01db01-orcldb1 {/acfs_ogg}:ls -l
    total 467040
    -rw-r–r– 1 oracle oinstall 475611228 Mar 25 01:51 fbo_ggs_Linux_x64_shiphome.zip

    dm01db01-orcldb1 {/acfs_ogg}:unzip fbo_ggs_Linux_x64_shiphome.zip
    Archive:  fbo_ggs_Linux_x64_shiphome.zip
       creating: fbo_ggs_Linux_x64_shiphome/
       creating: fbo_ggs_Linux_x64_shiphome/Disk1/
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/runInstaller
       creating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/OuiConfigVariables.xml
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/productlanguages.properties
       creating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/setperms1.sh
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora11g_filemap.jar
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora12c_dirs.lst
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora12c_1.xml
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/racfiles.jar
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora11g_dirs.lst
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora12c_filemap.jar
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora11g_1.xml
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora11g_exp_1.xml
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/fastcopy/oracle.oggcore.top_ora12c_exp_1.xml
       creating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/globalvariables/
       creating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/Dialogs/
       creating: fbo_ggs_Linux_x64_shiphome/Disk1/stage/Dialogs/standardDialogs/

    ……

       creating: fbo_ggs_Linux_x64_shiphome/Disk1/response/
      inflating: fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
      inflating: OGG-12.2.0.1-README.txt
      inflating: OGG-12.2.0.1.1-ReleaseNotes.pdf

    dm01db01-orcldb1 {/acfs_ogg}:ls -ltr
    total 467412
    drwxr-xr-x 3 oracle oinstall     20480 Dec 12  2015 fbo_ggs_Linux_x64_shiphome
    -rw-r–r– 1 oracle oinstall      1559 Jan 18  2016 OGG-12.2.0.1-README.txt
    -rw-r–r– 1 oracle oinstall    282294 Jan 18  2016 OGG-12.2.0.1.1-ReleaseNotes.pdf
    drwx—— 2 root   root         65536 Mar 23 08:53 lost+found
    -rw-r–r– 1 oracle oinstall 475611228 Mar 25 01:51 fbo_ggs_Linux_x64_shiphome.zip

    • Change directory to Disk1 and run the Installer
    dm01db01-orcldb1 {/acfs_ogg}:cd fbo_ggs_Linux_x64_shiphome

    dm01db01-orcldb1 {/acfs_ogg/fbo_ggs_Linux_x64_shiphome}:cd Disk1/

    dm01db01-orcldb1 {/acfs_ogg/fbo_ggs_Linux_x64_shiphome/Disk1}:ls -ltr
    total 160
    drwxr-xr-x  4 oracle oinstall 20480 Dec 12  2015 install
    drwxr-xr-x 11 oracle oinstall 20480 Dec 12  2015 stage
    -rwxr-xr-x  1 oracle oinstall   918 Dec 12  2015 runInstaller
    drwxrwxr-x  2 oracle oinstall 20480 Dec 12  2015 response



    dm01db01-orcldb1 {/acfs_ogg/fbo_ggs_Linux_x64_shiphome/Disk1}: ./runInstaller
    Select the Database version for which you are installing Oracle GoldenGate Software.
    Here I am Installing Oracle GoldenGate for Oracle Database 12c
    Click Next

    Specify the GoldenGate Software location. Here I am using /acfs_ogg (ACFS file system)
    Specify the Database Home Location and Manager port (Default Manager port is 7809) 
    Click Next

    Review the Installation Summary and click Install

    Oracle GoldenGate Software Installation in progress

    Installation completed. Click Close

    • Open the .bash_profile and add the following two variables
    dm01db01-orcldb1 {/home/oracle}: vi .bash_profile

    export GG_HOME=/acfs_ogg/app/oracle/product/12.2.0.1/gghome
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$GG_HOME

    *** Repeat the above step on all the nodes to update the .bash_profile***

    • Execute the .bash_profile and verify the variables.
    dm01db01-orcldb1 {/home/oracle}: . .bash_profile
    dm01db01-orcldb1 {/home/oracle}: echo $GG_HOME
    /acfs_ogg/app/oracle/product/12.2.0.1/gghome

    dm01db01-orcldb1 {/home/oracle}: echo $LD_LIBRARY_PATH
    /u01/app/oracle/product/12.2.0.1/dbhome/lib:/u01/app/oracle/product/12.2.0.1/dbhome/lib32:/acfs_ogg/app/oracle/product/12.2.0.1/gghome

    • Let’s connect to ggsci prompt and verify the manager process
    dm01db01-orcldb1 {/home/oracle}:cd $GG_HOME
    dm01db01-orcldb1 {/acfs_ogg/app/oracle/product/12.2.0.1/gghome}:./ggsci

    Oracle GoldenGate Command Interpreter for Oracle
    Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
    Linux, x64, 64bit (optimized), Oracle 12c on Dec 12 2015 02:56:48
    Operating system character set identified as UTF-8.

    Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.

    GGSCI (dm01db01.netsoftmate.com) 1> info all

    Program     Status      Group       Lag at Chkpt  Time Since Chkpt

    MANAGER     RUNNING

    GGSCI (dm01db01.netsoftmate.com) 2> info mgr

    Manager is running (IP port dm01db01.netsoftmate.com.15000, Process ID 10249).

    • Let’s verify it from node 2 this time. See the “info mgr” output. It clearly says that the mgr is up on node 1 that is dm01db01 using process ID 10249.
    dm01db02-orcldb2 {/home/oracle}:cd $GG_HOME
    dm01db02-orcldb2 {/acfs_ogg/app/oracle/product/12.2.0.1/gghome}:./ggsci

    Oracle GoldenGate Command Interpreter for Oracle
    Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
    Linux, x64, 64bit (optimized), Oracle 12c on Dec 12 2015 02:56:48
    Operating system character set identified as UTF-8.

    Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.

    GGSCI (dm01db02.netsoftmate.com) 1> info all

    Program     Status      Group       Lag at Chkpt  Time Since Chkpt

    MANAGER     RUNNING

    GGSCI (dm01db02.netsoftmate.com) 3> info mgr

    Manager is running (IP port dm01db01.netsoftmate.com.15000, Process ID 10249).

    dm01db02-orcldb2 {/acfs_ogg/app/oracle/product/12.2.0.1/gghome}:ps -ef|grep mgr
    oracle   19219   823  0 04:06 pts/0    00:00:00 grep mgr

    dm01db01-orcldb1 {/home/oracle}:dcli -g dbs_group -l oracle ‘ls -l /acfs_ogg/app/oracle/product/12.2.0.1/’
    dm01db01: total 52
    dm01db01: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome
    dm01db02: total 52
    dm01db02: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome
    dm01db03: total 52
    dm01db03: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome
    dm01db04: total 52
    dm01db04: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome
    dm01db05: total 52
    dm01db05: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome
    dm01db06: total 52
    dm01db06: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome
    dm01db07: total 52
    dm01db07: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome
    dm01db08: total 52
    dm01db08: drwxr-xr-x 26 oracle oinstall 20480 Mar 25 03:57 gghome

    Conclusion
    This completes our Oracle GoldenGate 12c installation on Exadata database machine using ACFS. We have seen how much easy it is to install Oracle GoldenGate software using GUI interface. The key for installing Oracle GoldenGate on 12c a RAC environment is to choose a shared location for software. You can also choose to install Oracle GoldenGate on local file system if you don’t have a shared location.

  • Configure ACFS on Exadata running Oracle 12.2.0.1 on Flex ASM Architecture

    Overview

    In one of previous article I have demonstrated how to configure ACFS on Exadata database running Oracle database 12.1.0.2 using standard ASM. Now I have an opportunity to configure Oracle GoldenGate on Exadata running Oracle database 12.2.0.1. So I have decides to configure ACFS on Exadata running Oracle database 12.2.0.1 using ASM Flex Architecture.

    In this article I will demostrate how to configure Oracle ACFS on Exadata Database machine running Oracle  Database 12.2.0.1 using Flex ASM.

    For details on ACFS and how to configure ACFS on Standard ASM look at my previous article at:
    http://netsoftmate.blogspot.in/2017/02/configure-acfs-on-exadata-database.html

    Prerequisites

    • Verify ASM configuration on Standard Cluster (8 nodes)

    Here the owner of the Grid Home is oracle user.

    dm01db01-+ASM1 {/home/oracle}:id oracle
    uid=1000(oracle) gid=1001(oinstall) groups=1001(oinstall),101(fuse),1002(dba),1003(oper),1004(asmdba)

    • Determine the ASM architecture

    Here it is an ASM Flex configuration using the default cardinally=3 and the ASM instances are running on node 1, 2 and 4 out of 8 nodes:

    dm01db01-+ASM1 {/home/oracle}:asmcmd showclustermode
    ASM cluster : Flex mode enabled

    dm01db01-orp258c1 {/home/oracle}:srvctl config asm -detail
    ASM home: <CRS home>
    Password file: +DBFS_DG/orapwASM
    Backup of Password file:
    ASM listener: LISTENER
    ASM is enabled.
    ASM is individually enabled on nodes:
    ASM is individually disabled on nodes:
    ASM instance count: 3
    Cluster ASM listener: ASMNET1LSNR_ASM

    dm01db01-+ASM1 {/home/oracle}:srvctl status asm
    ASM is running on dm01db04,dm01db02,dm01db01
    ASM is enabled.

    • Verify if ACFS/ADVM modules is enabled/loaded on every node in a standard cluster or every Hub Node in a Flex Cluster.

    [root@dm01db01 ~]# dcli -g dbs_group -l root ‘lsmod | grep oracle’
    dm01db01: oracleacfs           4609822  3
    dm01db01: oracleadvm            803161  17
    dm01db01: oracleoks             660948  2 oracleacfs,oracleadvm
    dm01db02: oracleacfs           4609822  3
    dm01db02: oracleadvm            803161  17
    dm01db02: oracleoks             660948  2 oracleacfs,oracleadvm
    dm01db03: oracleacfs           4609822  3
    dm01db03: oracleadvm            803161  17
    dm01db03: oracleoks             660948  2 oracleacfs,oracleadvm
    dm01db04: oracleacfs           4609822  3
    dm01db04: oracleadvm            803161  17
    dm01db04: oracleoks             660948  2 oracleacfs,oracleadvm
    dm01db05: oracleacfs           4609822  3
    dm01db05: oracleadvm            803161  17
    dm01db05: oracleoks             660948  2 oracleacfs,oracleadvm
    dm01db06: oracleacfs           4609822  3
    dm01db06: oracleadvm            803161  17
    dm01db06: oracleoks             660948  2 oracleacfs,oracleadvm
    dm01db07: oracleacfs           4609822  3
    dm01db07: oracleadvm            803161  17
    dm01db07: oracleoks             660948  2 oracleacfs,oracleadvm
    dm01db08: oracleacfs           4609822  3
    dm01db08: oracleadvm            803161  17
    dm01db08: oracleoks             660948  2 oracleacfs,oracleadvm

    • Check if ASM ADVM proxy is running on every node in a standard cluster or every Hub Node in a Flex Cluster.

    dm01db01-+ASM1 {/home/oracle}:srvctl status asm -proxy
    ADVM proxy is running on node dm01db06,dm01db05,dm01db04,dm01db03,dm01db02,dm01db01,dm01db08,dm01db07

    dm01db01-+ASM1 {/home/oracle}:srvctl config asm -proxy -detail
    ASM home: <CRS home>
    ADVM proxy is enabled
    ADVM proxy is individually enabled on nodes:
    ADVM proxy is individually disabled on nodes:

    dm01db01-orp258c1 {/home/oracle}:/u01/app/12.2.0.1/grid/bin/crsctl stat res ora.proxy_advm -t
    ——————————————————————————–
    Name           Target  State        Server                   State details
    ——————————————————————————–
    Local Resources
    ——————————————————————————–
    ora.proxy_advm
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ——————————————————————————–

    Step I – Create ASM Disk Group for ACFS

    • Login as Oracle Grid Infrastructure software owner and start asmca.

    dm01db01-orcldb1 {/home/oracle}: id oracle
    uid=1000(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1003(oper),1004(asmdba)

    • Set the ORACLE HOME and SID to ASM

    dm01db01-orcldb1 {/home/oracle}:. oraenv
    ORACLE_SID = [orcldb1] ? +ASM1
    The Oracle base remains unchanged with value /u01/app/oracle

    dm01db01-+ASM1 {/home/oracle}:env | grep ORA
    ORACLE_SID=+ASM1
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/12.2.0.1/grid

    • Set DISPLAY

    dm01db01-+ASM1 {/home/oracle}:export DISPLAY=10.30.20.13:0.0

    • Start asmca utility

    dm01db01-+ASM1 {/home/oracle}:which asmca
    /u01/app/12.1.0.2/grid/bin/asmca

    dm01db01-+ASM1 {/home/oracle}:asmca
     

    ASMCA warming up

    ASMCA Home page  appears

    Click on ASM Instances to view the ASM configuration. We can see that it a Flex ASM Configuration

    Click on “Dis Groups”  and click on “Create” button to create a new ASM Disk Group to be used for ACFS

    On Create Disk Group page, specify:
        – Disk Group Name: ACFS_DG
        – Redundancy: Normal
        – Select Member Disk: Show Eligible
            – Select all candidate disks to be part of ACFS_DG disk group
            – In Exadata each Storage cell is a failure Group
        – Click on Show Advanced Options, specify:
           – Specify the ASM/DB/ADVM Compatibilty
        – Click Ok

    ACFS_DG ASM Disk Group creation in progress

    We can see our ACFS_DG Disk Group created 

    • Verify newly created ACFS_DG Disk Group as follows:

    SQL> select inst_id, name, total_mb, group_number from gv$asm_diskgroup where name like ‘ACFS_DG’;

       INST_ID NAME                             TOTAL_MB GROUP_NUMBER
    ———- —————————— ———- ————
             1 ACFS_DG                          10407936            5
             3 ACFS_DG                          10407936            5
             2 ACFS_DG                          10407936            5

    SQL> col value for a30
    SQL> col name for a30
    SQL> select name, value from v$asm_attribute where GROUP_NUMBER=5 and name like ‘compatible%’;

    NAME                           VALUE
    —————————— ——————————
    compatible.asm                 12.2.0.1.0
    compatible.rdbms               11.2.0.4.0
    compatible.advm                12.2.0.1.0

    dm01db01-+ASM1 {/home/oracle}:/u01/app/12.2.0.1/grid/bin/crsctl stat res ora.ACFS_DG.dg -t
    ——————————————————————————–
    Name           Target  State        Server                   State details
    ——————————————————————————–
    Local Resources
    ——————————————————————————–
    ora.ACFS_DG.dg
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  OFFLINE      dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  OFFLINE      dm01db05                 STABLE
                   ONLINE  OFFLINE      dm01db06                 STABLE
                   ONLINE  OFFLINE      dm01db07                 STABLE
                   ONLINE  OFFLINE      dm01db08                 STABLE
    ——————————————————————————–

    Step II – Create ASM Volume
    Click on Volumes

    On Volumes page click on “Create”

    On Create Volume page, specify:
        – Volumn name: acfsvol
        – Disk Group name: ACFS_DG
        – Size: 4927.56 (it can be anything based on your requirement from usable space avaialble.)
        – Click Ok

    acfsvol creation is in progress

    We can see our Volume created

    •  Verify newly created Volume as follows:

    ASMCMD> volinfo –all
    Diskgroup Name: ACFS_DG

             Volume Name: ACFSVOL
             Volume Device: /dev/asm/acfsvol-223
             State: ENABLED
             Size (MB): 5045824
             Resize Unit (MB): 64
             Redundancy: MIRROR
             Stripe Columns: 8
             Stripe Width (K): 1024
             Usage: ACFS
             Mountpath: /acfs_ogg

    dm01db01-+ASM1 {/home/oracle}:/u01/app/12.2.0.1/grid/bin/crsctl stat res ora.ACFS_DG.ACFSVOL.advm -t
    ——————————————————————————–
    Name           Target  State        Server                   State details
    ——————————————————————————–
    Local Resources
    ——————————————————————————–
    ora.ACFS_DG.ACFSVOL.advm
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ——————————————————————————–

    dm01db01-+ASM1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘ls -l /dev/asm/*’
    dm01db01: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223
    dm01db02: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223
    dm01db03: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223
    dm01db04: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223
    dm01db05: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223
    dm01db06: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223
    dm01db07: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223
    dm01db08: brwxrwx— 1 root asmdba 251, 114177 Mar 23 08:53 /dev/asm/acfsvol-223

    III – Create ASM Cluster File system

    Click on “ASM Cluster File Systems” on left pane

    On ASM Cluster File Systems page click on “Create”


    On Create ASM Cluster File System page, specify:
        – Type of ACFS: Cluster File System
        – Mount point: /acfs_ogg
        – Auto Mount: check
        – User Name: oracle
        – Group Name: oinstall
        – Description: acfs for OGG
        – Select Volume: ACFSVOL – /dev/asm/acfsvol-223 – 4927.5625G
        – Click Ok

    ACFS creation in progress

    Run the ACFS script on Node 1 only to register ACFS with Grid Infrastructure and to mount the ACFS file system.

    • Contents of ACFS script looks like this:

    [root@dm01db01 ~]# cat /u01/app/grid/cfgtoollogs/asmca/scripts/acfs_script.sh | more
    #!/bin/sh
    /u01/app/12.2.0.1/grid/bin/srvctl add filesystem -d /dev/asm/acfsvol-223 -m /acfs_ogg -u oracle -fstype ACFS –

    description ‘acfs for OGG’ -autostart ALWAYS
    if [ $? = “0” -o $? = “2” ]; then
       /u01/app/12.2.0.1/grid/bin/srvctl start filesystem -d /dev/asm/acfsvol-223
       if [ $? = “0” ]; then
          chown oracle:oinstall /acfs_ogg
          chmod 775 /acfs_ogg
          /u01/app/12.2.0.1/grid/bin/srvctl status filesystem -d /dev/asm/acfsvol-223
          exit 0
       else
          exit $?
       fi
       /u01/app/12.2.0.1/grid/bin/srvctl status filesystem -d /dev/asm/acfsvol-223
    fi

    • Execute the script

    [root@dm01db01 ~]# /u01/app/grid/cfgtoollogs/asmca/scripts/acfs_script.sh
    ACFS file system /acfs_ogg is mounted on nodes
    dm01db01,dm01db02,dm01db03,dm01db04,dm01db05,dm01db06,dm01db07,dm01db08

    Click Close on the Run ACFS script window

    We can see our Volume created

    •  Verify newly created Volume as follows:

    dm01db01-+ASM1 {/home/oracle}:/u01/app/12.2.0.1/grid/bin/crsctl stat res ora.acfs_dg.acfsvol.acfs -t
    ——————————————————————————–
    Name           Target  State        Server                   State details
    ——————————————————————————–
    Local Resources
    ——————————————————————————–
    ora.acfs_dg.acfsvol.acfs
                   ONLINE  ONLINE       dm01db01                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db02                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db03                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db04                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db05                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db06                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db07                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db08                 mounted on /acfs_ogg
                                                                 ,STABLE
    ——————————————————————————–

    dm01db01-+ASM1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘df -h /acfs_ogg’
    dm01db01: Filesystem            Size  Used Avail Use% Mounted on
    dm01db01: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db02: Filesystem            Size  Used Avail Use% Mounted on
    dm01db02: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db03: Filesystem            Size  Used Avail Use% Mounted on
    dm01db03: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db04: Filesystem            Size  Used Avail Use% Mounted on
    dm01db04: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db05: Filesystem            Size  Used Avail Use% Mounted on
    dm01db05: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db06: Filesystem            Size  Used Avail Use% Mounted on
    dm01db06: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db07: Filesystem            Size  Used Avail Use% Mounted on
    dm01db07: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg
    dm01db08: Filesystem            Size  Used Avail Use% Mounted on
    dm01db08: /dev/asm/acfsvol-223  4.9T   12G  4.9T   1% /acfs_ogg

    dm01db01-orp258c1 {/home/oracle}:/u01/app/12.2.0.1/grid/bin/crsctl stat res -t
    ——————————————————————————–
    Name           Target  State        Server                   State details
    ——————————————————————————–
    Local Resources
    ——————————————————————————–
    ora.ACFS_DG.ACFSVOL.advm
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ora.ACFS_DG.dg
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  OFFLINE      dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  OFFLINE      dm01db05                 STABLE
                   ONLINE  OFFLINE      dm01db06                 STABLE
                   ONLINE  OFFLINE      dm01db07                 STABLE
                   ONLINE  OFFLINE      dm01db08                 STABLE
    ora.ASMNET1LSNR_ASM.lsnr
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ora.DATA.ACFSVOL1.advm
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ora.DATA.dg
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  OFFLINE      dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  OFFLINE      dm01db05                 STABLE
                   ONLINE  OFFLINE      dm01db06                 STABLE
                   ONLINE  OFFLINE      dm01db07                 STABLE
                   ONLINE  OFFLINE      dm01db08                 STABLE
    ora.DATA1.dg
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  OFFLINE      dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  OFFLINE      dm01db05                 STABLE
                   ONLINE  OFFLINE      dm01db06                 STABLE
                   ONLINE  OFFLINE      dm01db07                 STABLE
                   ONLINE  OFFLINE      dm01db08                 STABLE
    ora.DBFS_DG.dg
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   OFFLINE OFFLINE      dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   OFFLINE OFFLINE      dm01db05                 STABLE
                   OFFLINE OFFLINE      dm01db06                 STABLE
                   OFFLINE OFFLINE      dm01db07                 STABLE
                   OFFLINE OFFLINE      dm01db08                 STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ora.MGMT_DG.dg
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   OFFLINE OFFLINE      dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   OFFLINE OFFLINE      dm01db05                 STABLE
                   OFFLINE OFFLINE      dm01db06                 STABLE
                   OFFLINE OFFLINE      dm01db07                 STABLE
                   OFFLINE OFFLINE      dm01db08                 STABLE
    ora.acfs_dg.acfsvol.acfs
                   ONLINE  ONLINE       dm01db01                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db02                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db03                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db04                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db05                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db06                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db07                 mounted on /acfs_ogg
                                                                 ,STABLE
                   ONLINE  ONLINE       dm01db08                 mounted on /acfs_ogg
                                                                 ,STABLE
    ora.chad
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ora.data.acfsvol1.acfs
                   ONLINE  ONLINE       dm01db01                 mounted on /acfs_ogg
                                                                 1,STABLE
                   ONLINE  ONLINE       dm01db02                 mounted on /acfs_ogg
                                                                 1,STABLE
                   ONLINE  ONLINE       dm01db03                 mounted on /acfs_ogg
                                                                 1,STABLE
                   ONLINE  ONLINE       dm01db04                 mounted on /acfs_ogg
                                                                 1,STABLE
                   ONLINE  ONLINE       dm01db05                 mounted on /acfs_ogg
                                                                 1,STABLE
                   ONLINE  ONLINE       dm01db06                 mounted on /acfs_ogg
                                                                 1,STABLE
                   ONLINE  ONLINE       dm01db07                 mounted on /acfs_ogg
                                                                 1,STABLE
                   ONLINE  ONLINE       dm01db08                 mounted on /acfs_ogg
                                                                 1,STABLE
    ora.net1.network
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ora.ons
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ora.proxy_advm
                   ONLINE  ONLINE       dm01db01                 STABLE
                   ONLINE  ONLINE       dm01db02                 STABLE
                   ONLINE  ONLINE       dm01db03                 STABLE
                   ONLINE  ONLINE       dm01db04                 STABLE
                   ONLINE  ONLINE       dm01db05                 STABLE
                   ONLINE  ONLINE       dm01db06                 STABLE
                   ONLINE  ONLINE       dm01db07                 STABLE
                   ONLINE  ONLINE       dm01db08                 STABLE
    ——————————————————————————–
    Cluster Resources
    ——————————————————————————–
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       dm01db02                 STABLE
    ora.LISTENER_SCAN2.lsnr
          1        ONLINE  ONLINE       dm01db04                 STABLE
    ora.LISTENER_SCAN3.lsnr
          1        ONLINE  ONLINE       dm01db01                 STABLE
    ora.MGMTLSNR
          1        ONLINE  ONLINE       dm01db01                 192.168.2.1,STABLE
    ora.asm
          1        ONLINE  ONLINE       dm01db01                 Started,STABLE
          2        ONLINE  ONLINE       dm01db02                 Started,STABLE
          3        ONLINE  ONLINE       dm01db04                 Started,STABLE
    ora.dm01db01.vip
          1        ONLINE  ONLINE       dm01db01                 STABLE
    ora.dm01db02.vip
          1        ONLINE  ONLINE       dm01db02                 STABLE
    ora.dm01db03.vip
          1        ONLINE  ONLINE       dm01db03                 STABLE
    ora.dm01db04.vip
          1        ONLINE  ONLINE       dm01db04                 STABLE
    ora.dm01db05.vip
          1        ONLINE  ONLINE       dm01db05                 STABLE
    ora.dm01db06.vip
          1        ONLINE  ONLINE       dm01db06                 STABLE
    ora.dm01db07.vip
          1        ONLINE  ONLINE       dm01db07                 STABLE
    ora.dm01db08.vip
          1        ONLINE  ONLINE       dm01db08                 STABLE
    ora.cvu
          1        ONLINE  ONLINE       dm01db01                 STABLE
    ora.mgmtdb
          1        ONLINE  ONLINE       dm01db01                 Open,STABLE
    ora.orcldb.db
          1        ONLINE  ONLINE       dm01db01                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          2        ONLINE  ONLINE       dm01db02                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          3        ONLINE  ONLINE       dm01db04                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          4        ONLINE  ONLINE       dm01db05                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          5        ONLINE  ONLINE       dm01db07                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          6        ONLINE  ONLINE       dm01db06                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          7        ONLINE  ONLINE       dm01db03                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          8        ONLINE  ONLINE       dm01db08                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
    ora.prod.db
          1        ONLINE  ONLINE       dm01db01                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          2        ONLINE  ONLINE       dm01db02                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          3        ONLINE  ONLINE       dm01db04                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          4        ONLINE  ONLINE       dm01db05                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          5        ONLINE  ONLINE       dm01db07                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          6        ONLINE  ONLINE       dm01db06                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          7        ONLINE  ONLINE       dm01db03                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
          8        ONLINE  ONLINE       dm01db08                 Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 .1/dbhome,STABLE
    ora.qosmserver
          1        ONLINE  ONLINE       dm01db01                 STABLE
    ora.scan1.vip
          1        ONLINE  ONLINE       dm01db02                 STABLE
    ora.scan2.vip
          1        ONLINE  ONLINE       dm01db04                 STABLE
    ora.scan3.vip
          1        ONLINE  ONLINE       dm01db01                 STABLE
    ——————————————————————————–

    Conclusion:
    In this article we have learned how to quickly configure ACFS on Exadata Database machine running Oracle 12.2.0.1 on ASM Flex Architecture.