,

  • Oracle 26ai MULTI_APPEND and NO_MULTI_APPEND Hint

    OS Environment: Oracle Linux 9.6 (64bit)
    DB Environment: Oracle AI Database 23.26.3.0.0 ai


    Starting with Oracle Database 26ai, a table can be queried or modified again within the same transaction after a Direct Path Insert.

    In Oracle 19c, when a Direct Path Insert was performed using the APPEND hint, accessing the same table again before a COMMIT or ROLLBACK resulted in an ORA-12838 error.

    In 26ai, this restriction is removed by default.

    The behavior is controlled by the hidden parameter _online_direct_load. Setting this parameter to 0 restores the behavior of previous versions, where the same table cannot be accessed again after an append insert until the transaction is completed.

    Reference: Oracle 26ai – Direct Load (Direct Path Insert) Transaction Restriction Removed

    In addition to the _online_direct_load hidden parameter, the NO_MULTI_APPEND hint tested in this article can also restore the previous behavior.

    When APPEND and NO_MULTI_APPEND are used together, Oracle 26ai raises ORA-12838 when the same table is queried or modified again after a Direct Path Insert, similar to Oracle 19c.

    Tests

    1. Check the MULTI_APPEND hint
    2. Check the test environment
    3. Create a sample table
    4. Test default APPEND behavior
    5. Test APPEND + MULTI_APPEND
    6. Test APPEND + NO_MULTI_APPEND
    7. Compare with NOAPPEND
    8. Compare the results

    1. Check the MULTI_APPEND Hint

    First, check whether the hints exist in V$SQL_HINT.

    SQL>
    set lines 200 pages 1000
    col name for a30
    col inverse for a30
    col version for a15
    select name, inverse, target_level, version
    from v$sql_hint
    where name in ('APPEND', 'NOAPPEND',
    'MULTI_APPEND', 'NO_MULTI_APPEND')
    order by name;
    
    NAME                           INVERSE                        TARGET_LEVEL VERSION
    ------------------------------ ------------------------------ ------------ ---------------
    APPEND                         NOAPPEND                                  1 8.1.0
    MULTI_APPEND                   NO_MULTI_APPEND                           1 23.1.0
    NOAPPEND                       APPEND                                    1 8.1.0
    NO_MULTI_APPEND                MULTI_APPEND                              1 23.1.0

    MULTI_APPEND and NO_MULTI_APPEND are available and show a version of 23.1.0.


    2. Check the Test Environment

    Check the database version.

    SQL>
    set lines 200 pages 1000
    select * from v$version;
    
    BANNER
    ---------------------------------------------------------------------------------------------------------------------------------
    BANNER_FULL
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    BANNER_LEGACY                                                                                                                         CON_ID
    --------------------------------------------------------------------------------------------------------------------------------- ----------
    Oracle AI Database 26ai Enterprise Edition Release 23.26.3.0.0 - Production
    Oracle AI Database 26ai Enterprise Edition Release 23.26.3.0.0 - Production
    Version 23.26.3.0.0
    Oracle AI Database 26ai Enterprise Edition Release 23.26.3.0.0 - Production                                                                0

    The database version used for this test is 23.26.3.0.0.

    Check the COMPATIBLE parameter.

    SQL> show parameter compatible
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    compatible                           string      23.6.0
    noncdb_compatible                    boolean     FALSE

    The COMPATIBLE parameter is set to 23.6.0.


    3. Create a Sample Table

    Create EMP2 from the EMP table.

    SQL>
    drop table emp2 purge;
    create table emp2 as select * from emp;

    Check the number of rows.

    SQL>
    select count(*) from emp2;
    
      COUNT(*)
    ----------
            14

    The table currently contains 14 rows.


    4. Test Default APPEND Behavior

    Set STATISTICS_LEVEL to ALL so the execution plan can be checked.

    SQL> alter session set statistics_level = all;
    
    Session altered.

    First, use only the existing APPEND hint without explicitly specifying MULTI_APPEND.

    SQL> insert /*+ append */ into emp2 select * from emp2;
    
    14 rows created.

    14 rows are inserted, bringing the total to 28 rows.

    Before issuing a COMMIT, check the execution plan.

    SQL> SELECT * FROM DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALLSTATS LAST -rows -Projection +HINT_REPORT +outline');
    
    Plan hash value: 1283500778
    
    ------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                        | Name | Starts | A-Rows |   A-Time   | Buffers | Writes |  OMem |  1Mem | Used-Mem |
    ------------------------------------------------------------------------------------------------------------------------------
    |   0 | INSERT STATEMENT                 |      |      1 |      0 |00:00:00.01 |      13 |      1 |       |       |          |
    |   1 |  LOAD AS SELECT                  | EMP2 |      1 |      0 |00:00:00.01 |      13 |      1 |  1043K|  1043K| 1043K (0)|
    |   2 |   OPTIMIZER STATISTICS GATHERING |      |      1 |     14 |00:00:00.01 |       3 |      0 |   256K|   256K|          |
    |   3 |    TABLE ACCESS FULL             | EMP2 |      1 |     14 |00:00:00.01 |       2 |      0 |       |       |          |
    ------------------------------------------------------------------------------------------------------------------------------
    
    Outline Data
    -------------
    
      /*+
          BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('23.1.0')
          DB_VERSION('23.1.0')
          ALL_ROWS
          OUTLINE_LEAF(@"SEL$1")
          OUTLINE_LEAF(@"INS$1")
          LOAD_METHOD(@"INS$1" "EMP2"@"INS$1" HIGH_WATER_MARK)
          LOAD_TYPE(@"INS$1" "EMP2"@"INS$1" SERIAL)
          FULL(@"INS$1" "EMP2"@"INS$1")
          FULL(@"SEL$1" "EMP2"@"SEL$1")
          END_OUTLINE_DATA
      */
    
    
    33 rows selected.

    The execution plan shows LOAD AS SELECT, and the outline contains LOAD_METHOD(... HIGH_WATER_MARK), confirming that the APPEND hint was applied and a Direct Path Insert was used.

    Now query EMP2 without committing the transaction.

    SQL> select count(*) from emp2;
    
      COUNT(*)
    ----------
            28

    All 28 rows can be queried successfully.

    In Oracle 19c, this is where ORA-12838 would normally occur. In 26ai, however, the table can be queried without ending the transaction.

    Reference: Oracle 26ai – Direct Load (Direct Path Insert) Transaction Restriction Removed

    Run another APPEND insert without committing.

    SQL> insert /*+ append */ into emp2 select * from emp2;
    
    28 rows created.

    Another 28 rows are inserted successfully.

    Check the row count again.

    SQL> select count(*) from emp2;
    
      COUNT(*)
    ----------
            56

    The table now contains 56 rows.

    This confirms that in Oracle 26ai, when only the APPEND hint is used, a table can be queried and another Direct Path Insert can be performed within the same transaction.

    Rollback the test data.

    SQL> rollback;
    
    Rollback complete.

    5. Test APPEND + MULTI_APPEND

    Set STATISTICS_LEVEL to ALL again.

    SQL> alter session set statistics_level = all;
    
    Session altered.

    This time, use APPEND together with MULTI_APPEND.

    SQL> insert /*+ append multi_append */ into emp2 select * from emp2;
    
    14 rows created.

    Check the execution plan before committing.

    SQL> SELECT * FROM DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALLSTATS LAST -rows -Projection +HINT_REPORT +outline');
    
    Plan hash value: 1283500778
    
    ------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                        | Name | Starts | A-Rows |   A-Time   | Buffers | Writes |  OMem |  1Mem | Used-Mem |
    ------------------------------------------------------------------------------------------------------------------------------
    |   0 | INSERT STATEMENT                 |      |      1 |      0 |00:00:00.01 |      45 |      1 |       |       |          |
    |   1 |  LOAD AS SELECT                  | EMP2 |      1 |      0 |00:00:00.01 |      45 |      1 |  1043K|  1043K| 1043K (0)|
    |   2 |   OPTIMIZER STATISTICS GATHERING |      |      1 |     14 |00:00:00.01 |       8 |      0 |   256K|   256K|          |
    |   3 |    TABLE ACCESS FULL             | EMP2 |      1 |     14 |00:00:00.01 |       7 |      0 |       |       |          |
    ------------------------------------------------------------------------------------------------------------------------------
    
    Outline Data
    -------------
    
      /*+
          BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('23.1.0')
          DB_VERSION('23.1.0')
          ALL_ROWS
          OUTLINE_LEAF(@"SEL$1")
          OUTLINE_LEAF(@"INS$1")
          LOAD_METHOD(@"INS$1" "EMP2"@"INS$1" HIGH_WATER_MARK)
          LOAD_TYPE(@"INS$1" "EMP2"@"INS$1" SERIAL)
          FULL(@"INS$1" "EMP2"@"INS$1")
          FULL(@"SEL$1" "EMP2"@"SEL$1")
          END_OUTLINE_DATA
      */
    
    
    33 rows selected.

    As with the previous test, the execution plan shows LOAD AS SELECT, and the outline contains LOAD_METHOD(... HIGH_WATER_MARK).

    The LOAD_METHOD and LOAD_TYPE values are also the same as when only the APPEND hint was used.

    Query EMP2 without committing.

    SQL> select count(*) from emp2;
    
      COUNT(*)
    ----------
            28

    The query succeeds and returns 28 rows.

    In Oracle 19c, this operation would result in ORA-12838, but it works normally in 26ai.

    Run another APPEND + MULTI_APPEND insert without committing.

    SQL> insert /*+ append multi_append */ into emp2 select * from emp2;
    
    28 rows created.

    The insert succeeds.

    Check the row count again.

    SQL> select count(*) from emp2;
    
      COUNT(*)
    ----------
            56

    The table now contains 56 rows.

    The behavior is the same as using APPEND alone. With APPEND + MULTI_APPEND, Oracle 26ai allows the same table to be queried and another Direct Path Insert to be performed within the same transaction.

    Rollback the test data.

    SQL> rollback;
    
    Rollback complete.

    6. Test APPEND + NO_MULTI_APPEND

    Set STATISTICS_LEVEL to ALL.

    SQL> alter session set statistics_level = all;
    
    Session altered.

    This time, use APPEND together with NO_MULTI_APPEND.

    SQL> insert /*+ append no_multi_append */ into emp2 select * from emp2;
    
    14 rows created.

    Before committing, check the execution plan.

    SQL> SELECT * FROM DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALLSTATS LAST -rows -Projection +HINT_REPORT +outline');
    
    Plan hash value: 1283500778
    
    ------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                        | Name | Starts | A-Rows |   A-Time   | Buffers | Writes |  OMem |  1Mem | Used-Mem |
    ------------------------------------------------------------------------------------------------------------------------------
    |   0 | INSERT STATEMENT                 |      |      1 |      0 |00:00:00.01 |      13 |      1 |       |       |          |
    |   1 |  LOAD AS SELECT                  | EMP2 |      1 |      0 |00:00:00.01 |      13 |      1 |  1043K|  1043K| 1043K (0)|
    |   2 |   OPTIMIZER STATISTICS GATHERING |      |      1 |     14 |00:00:00.01 |       8 |      0 |   256K|   256K|          |
    |   3 |    TABLE ACCESS FULL             | EMP2 |      1 |     14 |00:00:00.01 |       7 |      0 |       |       |          |
    ------------------------------------------------------------------------------------------------------------------------------
    
    Outline Data
    -------------
    
      /*+
          BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('23.1.0')
          DB_VERSION('23.1.0')
          ALL_ROWS
          OUTLINE_LEAF(@"SEL$1")
          OUTLINE_LEAF(@"INS$1")
          LOAD_METHOD(@"INS$1" "EMP2"@"INS$1" HIGH_WATER_MARK)
          LOAD_TYPE(@"INS$1" "EMP2"@"INS$1" SERIAL)
          FULL(@"INS$1" "EMP2"@"INS$1")
          FULL(@"SEL$1" "EMP2"@"SEL$1")
          END_OUTLINE_DATA
      */
    
    
    33 rows selected.

    The execution plan still shows LOAD AS SELECT, and the outline contains LOAD_METHOD(... HIGH_WATER_MARK).

    This means that NO_MULTI_APPEND does not disable Direct Path Insert. The LOAD_METHOD and LOAD_TYPE values are the same as in the previous APPEND tests.

    Now try to query EMP2 without committing.

    SQL> select count(*) from emp2;
    select count(*) from emp2
    *
    ERROR at line 1:
    ORA-12838: cannot read/modify an object after modifying it in parallel
    Help: https://docs.oracle.com/error-help/db/ora-12838/

    This time, ORA-12838 occurs, which is the same behavior seen in Oracle 19c.

    Try another Direct Path Insert without committing.

    SQL> insert /*+ append no_multi_append */ into emp2 select * from emp2;
    insert /*+ append no_multi_append */ into emp2 select * from emp2
    *
    ERROR at line 1:
    ORA-12838: cannot read/modify an object after modifying it in parallel
    Help: https://docs.oracle.com/error-help/db/ora-12838/

    Again, ORA-12838 occurs.

    Therefore, when APPEND and NO_MULTI_APPEND are used together in Oracle 26ai, the Direct Path Insert itself still occurs, but the same table cannot be queried or modified again within the same transaction.

    This is effectively the same transaction restriction seen in Oracle 19c.

    Rollback the test data.

    SQL> rollback;
    
    Rollback complete.

    7. Compare with NOAPPEND

    Next, compare NO_MULTI_APPEND with NOAPPEND.

    First, perform the insert using only the NOAPPEND hint.

    SQL> insert /*+ noappend */ into emp2 select * from emp2;

    Check the execution plan before committing.

    SQL> SELECT * FROM DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALLSTATS LAST -rows -Projection +HINT_REPORT +outline');
    
    Plan hash value: 2941272003
    
    ----------------------------------------------------------------------------------
    | Id  | Operation                | Name | Starts | A-Rows |   A-Time   | Buffers |
    ----------------------------------------------------------------------------------
    |   0 | INSERT STATEMENT         |      |      1 |      0 |00:00:00.01 |      37 |
    |   1 |  LOAD TABLE CONVENTIONAL | EMP2 |      1 |      0 |00:00:00.01 |      37 |
    |   2 |   TABLE ACCESS FULL      | EMP2 |      1 |     14 |00:00:00.01 |       7 |
    ----------------------------------------------------------------------------------
    
    Outline Data
    -------------
    
      /*+
          BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('23.1.0')
          DB_VERSION('23.1.0')
          ALL_ROWS
          OUTLINE_LEAF(@"SEL$1")
          OUTLINE_LEAF(@"INS$1")
          LOAD_METHOD(@"INS$1" "EMP2"@"INS$1" CONVENTIONAL)
          LOAD_TYPE(@"INS$1" "EMP2"@"INS$1" SERIAL)
          FULL(@"INS$1" "EMP2"@"INS$1")
          FULL(@"SEL$1" "EMP2"@"SEL$1")
          END_OUTLINE_DATA
      */
    
    
    32 rows selected.

    This execution plan shows LOAD TABLE CONVENTIONAL.

    The outline also shows:

    LOAD_METHOD(... CONVENTIONAL)

    This confirms that NOAPPEND disables Direct Path Insert and uses a conventional insert instead.

    In this case, the table can be queried without committing.

    SQL> select count(*) from emp2;
    
      COUNT(*)
    ----------
            28

    Another insert also works normally.

    SQL> insert into emp2 select * from emp2;
    
    28 rows created.

    Rollback the test data.

    SQL> rollback;
    
    Rollback complete.

    8. Compare the Results

    The behavior observed in the tests can be summarized as follows:

    HintInsert MethodAccess Same Table Before COMMITResult
    APPENDDirect Path InsertYesWorks
    APPEND MULTI_APPENDDirect Path InsertYesWorks
    APPEND NO_MULTI_APPENDDirect Path InsertNoORA-12838
    NOAPPENDConventional InsertYesWorks

    NOAPPEND

    • Opposite of the APPEND hint
    • Does not use Direct Path Insert
    • Uses a conventional insert
    • The same table can be queried within the same transaction

    NO_MULTI_APPEND

    • Can be used together with APPEND
    • Direct Path Insert is still used
    • The execution plan shows LOAD AS SELECT
    • Querying or modifying the same table after the Direct Path Insert results in ORA-12838

    MULTI_APPEND

    • Can be used together with APPEND
    • Direct Path Insert is still used
    • The execution plan shows LOAD AS SELECT
    • The same table can be queried or modified again after the Direct Path Insert without an error
    • This is also the default behavior in Oracle 26ai when only APPEND is specified

    Conclusion

    In Oracle 26ai, after performing a Direct Path Insert with the APPEND hint, the same table can be queried or another Direct Path Insert can be performed without ending the transaction.

    Using APPEND alone and explicitly specifying APPEND + MULTI_APPEND produced the same behavior in this test.

    On the other hand, when APPEND + NO_MULTI_APPEND was used, the Direct Path Insert itself still occurred, but accessing the same table afterward resulted in ORA-12838, just as it would in Oracle 19c.

    The important point is that NO_MULTI_APPEND does not change an APPEND insert into a conventional insert.

    Instead, it appears to restore the transaction restriction that was removed for Direct Path Inserts in 26ai.

    In that sense, NO_MULTI_APPEND can be thought of as a hint-level way to get behavior similar to disabling the newer online direct load behavior controlled by the _online_direct_load hidden parameter.


    References

  • How to Rename ASM Diskgroup

    OS Environment: Oracle Linux 8.7 (64bit)

    DB Environment: Oracle Database 19.27.0.0


    This article explains how to change the ASM disk group name in Oracle 19c. It covers how to rename both a disk group without DB data (such as DBF files) and a disk group containing DB data. For reference, in the current environment, RAC is configured using the oracleasm library.

    Tests

    1. Renaming a disk group without DB data
    2. Renaming a disk group with DB data

    Test

    1. Renaming a disk group without DB data

    Check CRS information:

    $ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       ora19rac1                STABLE
                   ONLINE  ONLINE       ora19rac2                STABLE
    ora.chad
                   ONLINE  ONLINE       ora19rac1                STABLE
                   OFFLINE OFFLINE      ora19rac2                STABLE
    ora.net1.network
                   ONLINE  ONLINE       ora19rac1                STABLE
                   ONLINE  ONLINE       ora19rac2                STABLE
    ora.ons
                   ONLINE  ONLINE       ora19rac1                STABLE
                   ONLINE  ONLINE       ora19rac2                STABLE
    ora.proxy_advm
                   OFFLINE OFFLINE      ora19rac1                STABLE
                   OFFLINE OFFLINE      ora19rac2                STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
          1        ONLINE  ONLINE       ora19rac1                STABLE
          2        ONLINE  ONLINE       ora19rac2                STABLE
    ora.DATA.dg(ora.asmgroup)
          1        ONLINE  ONLINE       ora19rac1                STABLE
          2        ONLINE  ONLINE       ora19rac2                STABLE
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       ora19rac2                STABLE
    ora.OCRVOTE.dg(ora.asmgroup)
          1        ONLINE  ONLINE       ora19rac1                STABLE
          2        ONLINE  ONLINE       ora19rac2                STABLE
    ora.RECO.dg(ora.asmgroup) <<---
          1        ONLINE  ONLINE       ora19rac1                STABLE
          2        ONLINE  ONLINE       ora19rac2                STABLE
    ora.asm(ora.asmgroup)
          1        ONLINE  ONLINE       ora19rac1                Started,STABLE
          2        ONLINE  ONLINE       ora19rac2                Started,STABLE
    ora.asmnet1.asmnetwork(ora.asmgroup)
          1        ONLINE  ONLINE       ora19rac1                STABLE
          2        ONLINE  ONLINE       ora19rac2                STABLE
    ora.cvu
          1        ONLINE  ONLINE       ora19rac2                STABLE
    ora.ora19db.db
          1        ONLINE  ONLINE       ora19rac1                Open,HOME=/oracle/ap
                                                                 p/oracle/product/19c
                                                                 ,STABLE
          2        ONLINE  ONLINE       ora19rac2                Open,HOME=/oracle/ap
                                                                 p/oracle/product/19c
                                                                 ,STABLE
    ora.ora19rac1.vip
          1        ONLINE  ONLINE       ora19rac1                STABLE
    ora.ora19rac2.vip
          1        ONLINE  ONLINE       ora19rac2                STABLE
    ora.qosmserver
          1        ONLINE  ONLINE       ora19rac2                STABLE
    ora.scan1.vip
          1        ONLINE  ONLINE       ora19rac2                STABLE
    --------------------------------------------------------------------------------

    Check with lsdg:

    $ asmcmd
    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  EXTERN  N         512             512   4096  4194304     29696    11028                0           11028              0             N  DATA/
    MOUNTED  NORMAL  N         512             512   4096  4194304      6144     5108             2048            1530              0             Y  OCRVOTE/
    MOUNTED  EXTERN  N         512             512   4096  4194304    101376    86848                0           86848              0             N  RECO/

    Check v$asm_diskgroup:

    SQL> select inst_id,name, state from gv$asm_diskgroup;
     
       INST_ID NAME                           STATE
    ---------- ------------------------------ -----------
             2 DATA                           MOUNTED
             2 OCRVOTE                        MOUNTED
             2 RECO                           MOUNTED
             1 DATA                           MOUNTED
             1 OCRVOTE                        MOUNTED
             1 RECO                           MOUNTED
     
    6 rows selected.

    If the disk is not in use, unmount it (if it’s a DG with DBF files, shut down the DB first):

    # Node 1
    # asmcmd umount 
    ASMCMD> umount RECO
    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  EXTERN  N         512             512   4096  4194304     29696    11028                0           11028              0             N  DATA/
    MOUNTED  NORMAL  N         512             512   4096  4194304      6144     5108             2048            1530              0             Y  OCRVOTE/
    
    # Node 2
    # asmcmd umount 
    ASMCMD> umount RECO
    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  EXTERN  N         512             512   4096  4194304     29696    11028                0           11028              0             N  DATA/

    Check v$asm_diskgroup:

    SQL> select inst_id,name, state from gv$asm_diskgroup;
     
       INST_ID NAME                           STATE
    ---------- ------------------------------ -----------
             1 RECO                           DISMOUNTED
             1 DATA                           CONNECTED
             1 OCRVOTE                        MOUNTED
             2 RECO                           DISMOUNTED
             2 DATA                           CONNECTED
             2 OCRVOTE                        MOUNTED
     
    6 rows selected.

    Rename the disk group (Run as the grid user) Example) $ renamedg phase=both dgname=<old_dg_name> newdgname=<new_dg_name> verbose=true

    $ which renamedg
    /oracle/app/grid/19c/bin/renamedg
    $ renamedg phase=both dgname=RECO newdgname=RECONEW verbose=true
     
    Parameters in effect:
     
             Old DG name       : RECO
             New DG name          : RECONEW
             Phases               :
                     Phase 1
                     Phase 2
             Discovery str        : (null)
             Clean              : TRUE
             Raw only           : TRUE
    renamedg operation: phase=both dgname=RECO newdgname=RECONEW verbose=true
    Executing phase 1
    Discovering the group
    Performing discovery with string:
    Identified disk ASM:ASM Library - Generic Linux, version 2.0.17 (KABI_V2):ORCL:RECO02 with disk number:0 and timestamp (33183368 2133368832)
    Checking for hearbeat...
    Re-discovering the group
    Performing discovery with string:
    Identified disk ASM:ASM Library - Generic Linux, version 2.0.17 (KABI_V2):ORCL:RECO02 with disk number:0 and timestamp (33183368 2133368832)
    Checking if the diskgroup is mounted or used by CSS
    Checking disk number:0
    Generating configuration file..
    Completed phase 1
    Executing phase 2
    Looking for ORCL:RECO02
    Pre-image dump of header : ORCL:RECO02
    kfbh.endian:                          1 ; 0x000: 0x01
     
    kfbh.hard:                          130 ; 0x001: 0x82
     
    kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
     
    kfbh.datfmt:                          1 ; 0x003: 0x01
     
    kfbh.block.blk:                       0 ; 0x004: blk=0
     
    kfbh.block.obj:              2147483648 ; 0x008: disk=0
     
    kfbh.check:                  1919283327 ; 0x00c: 0x7265f07f
     
    kfbh.fcn.base:                        0 ; 0x010: 0x00000000
     
    kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
     
    kfbh.spare1:                          0 ; 0x018: 0x00000000
     
    kfbh.spare2:                          0 ; 0x01c: 0x00000000
     
    kfdhdb.driver.provstr:   ORCLDISKRECO02 ; 0x000: length=14
     
    kfdhdb.driver.reserved[0]:   1329808722 ; 0x008: 0x4f434552
     
    kfdhdb.driver.reserved[1]:        12848 ; 0x00c: 0x00003230
     
    kfdhdb.driver.reserved[2]:            0 ; 0x010: 0x00000000
     
    kfdhdb.driver.reserved[3]:            0 ; 0x014: 0x00000000
     
    kfdhdb.driver.reserved[4]:            0 ; 0x018: 0x00000000
     
    kfdhdb.driver.reserved[5]:            0 ; 0x01c: 0x00000000
     
    kfdhdb.compat:                318767104 ; 0x020: 0x13000000
     
    kfdhdb.dsknum:                        0 ; 0x024: 0x0000
     
    kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
     
    kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
     
    kfdhdb.dskname:               RECO_0000 ; 0x028: length=9
     
    kfdhdb.grpname:                    RECO ; 0x048: length=4
     
    kfdhdb.fgname:                RECO_0000 ; 0x068: length=9
     
    kfdhdb.siteguid[0]:                   0 ; 0x088: 0x00
     
    kfdhdb.siteguid[1]:                   0 ; 0x089: 0x00
     
    kfdhdb.siteguid[2]:                   0 ; 0x08a: 0x00
     
    kfdhdb.siteguid[3]:                   0 ; 0x08b: 0x00
     
    kfdhdb.siteguid[4]:                   0 ; 0x08c: 0x00
     
    kfdhdb.siteguid[5]:                   0 ; 0x08d: 0x00
     
    kfdhdb.siteguid[6]:                   0 ; 0x08e: 0x00
     
    kfdhdb.siteguid[7]:                   0 ; 0x08f: 0x00
     
    kfdhdb.siteguid[8]:                   0 ; 0x090: 0x00
     
    kfdhdb.siteguid[9]:                   0 ; 0x091: 0x00
     
    kfdhdb.siteguid[10]:                  0 ; 0x092: 0x00
     
    kfdhdb.siteguid[11]:                  0 ; 0x093: 0x00
     
    kfdhdb.siteguid[12]:                  0 ; 0x094: 0x00
     
    kfdhdb.siteguid[13]:                  0 ; 0x095: 0x00
     
    kfdhdb.siteguid[14]:                  0 ; 0x096: 0x00
     
    kfdhdb.siteguid[15]:                  0 ; 0x097: 0x00
     
    kfdhdb.ub1spare[0]:                   0 ; 0x098: 0x00
     
    kfdhdb.ub1spare[1]:                   0 ; 0x099: 0x00
     
    kfdhdb.ub1spare[2]:                   0 ; 0x09a: 0x00
     
    kfdhdb.ub1spare[3]:                   0 ; 0x09b: 0x00
     
    kfdhdb.ub1spare[4]:                   0 ; 0x09c: 0x00
     
    kfdhdb.ub1spare[5]:                   0 ; 0x09d: 0x00
     
    kfdhdb.ub1spare[6]:                   0 ; 0x09e: 0x00
     
    kfdhdb.ub1spare[7]:                   0 ; 0x09f: 0x00
     
    kfdhdb.ub1spare[8]:                   0 ; 0x0a0: 0x00
     
    kfdhdb.ub1spare[9]:                   0 ; 0x0a1: 0x00
     
    kfdhdb.ub1spare[10]:                  0 ; 0x0a2: 0x00
     
    kfdhdb.ub1spare[11]:                  0 ; 0x0a3: 0x00
     
    kfdhdb.ub1spare[12]:                  0 ; 0x0a4: 0x00
     
    kfdhdb.ub1spare[13]:                  0 ; 0x0a5: 0x00
     
    kfdhdb.ub1spare[14]:                  0 ; 0x0a6: 0x00
     
    kfdhdb.ub1spare[15]:                  0 ; 0x0a7: 0x00
     
    kfdhdb.crestmp.hi:             33183368 ; 0x0a8: HOUR=0x8 DAYS=0x14 MNTH=0x5 YEAR=0x7e9
     
    kfdhdb.crestmp.lo:           2133368832 ; 0x0ac: USEC=0x0 MSEC=0x228 SECS=0x32 MINS=0x1f
     
    kfdhdb.mntstmp.hi:             33189422 ; 0x0b0: HOUR=0xe DAYS=0x11 MNTH=0xb YEAR=0x7e9
     
    kfdhdb.mntstmp.lo:            658845696 ; 0x0b4: USEC=0x0 MSEC=0x14c SECS=0x34 MINS=0x9
     
    kfdhdb.secsize:                     512 ; 0x0b8: 0x0200
     
    kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000
     
    kfdhdb.ausize:                  4194304 ; 0x0bc: 0x00400000
     
    kfdhdb.mfact:                    454272 ; 0x0c0: 0x0006ee80
     
    kfdhdb.dsksize:                   25344 ; 0x0c4: 0x00006300
     
    kfdhdb.pmcnt:                         3 ; 0x0c8: 0x00000003
     
    kfdhdb.fstlocn:                       1 ; 0x0cc: 0x00000001
     
    kfdhdb.altlocn:                       2 ; 0x0d0: 0x00000002
     
    kfdhdb.f1b1locn:                     10 ; 0x0d4: 0x0000000a
     
    kfdhdb.redomirrors[0]:                0 ; 0x0d8: 0x0000
     
    kfdhdb.redomirrors[1]:                0 ; 0x0da: 0x0000
     
    kfdhdb.redomirrors[2]:                0 ; 0x0dc: 0x0000
     
    kfdhdb.redomirrors[3]:                0 ; 0x0de: 0x0000
     
    kfdhdb.dbcompat:              168820736 ; 0x0e0: 0x0a100000
     
    kfdhdb.grpstmp.hi:             33183368 ; 0x0e4: HOUR=0x8 DAYS=0x14 MNTH=0x5 YEAR=0x7e9
     
    kfdhdb.grpstmp.lo:           2133273600 ; 0x0e8: USEC=0x0 MSEC=0x1cb SECS=0x32 MINS=0x1f
     
    kfdhdb.vfstart:                       0 ; 0x0ec: 0x00000000
     
    kfdhdb.vfend:                         0 ; 0x0f0: 0x00000000
     
    kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
     
    kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
     
    kfdhdb.flags:                         1 ; 0x0fc: 0x00000001
     
    kfdhdb.f1b1fcn.base:                  0 ; 0x100: 0x00000000
     
    kfdhdb.f1b1fcn.wrap:                  0 ; 0x104: 0x00000000
     
    kfdhdb.ip[0]:                       192 ; 0x108: 0xc0
     
    kfdhdb.ip[1]:                       168 ; 0x109: 0xa8
     
    kfdhdb.ip[2]:                       137 ; 0x10a: 0x89
     
    kfdhdb.ip[3]:                       162 ; 0x10b: 0xa2
     
    kfdhdb.modstmp:              1763356192 ; 0x10c: 0x691aae20
     
    kfdhdb.checklbl:                      0 ; 0x110: 0x00
     
    kfdhdb.verlbl:                        0 ; 0x111: 0x00
     
    kfdhdb.ub2spare:                      0 ; 0x112: 0x0000
     
    kfdhdb.sitelbl:                         ; 0x114: length=0
     
    kfdhdb.fglbl:                           ; 0x124: length=0
     
    kfdhdb.vsnnum:                318767104 ; 0x144: 0x13000000
     
    kfdhdb.patchvsn:                      0 ; 0x148: 0x0000
     
    kfdhdb.operation:                     0 ; 0x14a: 0x0000
     
    kfdhdb.xtnd[0]:                       0 ; 0x14c: 0x0000
     
    kfdhdb.xtnd[1]:                       0 ; 0x14e: 0x0000
     
    kfdhdb.xtnd[2]:                       0 ; 0x150: 0x0000
     
    kfdhdb.xtnd[3]:                       0 ; 0x152: 0x0000
     
    kfdhdb.xtnd[4]:                       0 ; 0x154: 0x0000
     
    kfdhdb.xtnd[5]:                       0 ; 0x156: 0x0000
     
    kfdhdb.ub4spare[0]:                   0 ; 0x158: 0x00000000
     
    kfdhdb.ub4spare[1]:                   0 ; 0x15c: 0x00000000
     
    kfdhdb.ub4spare[2]:                   0 ; 0x160: 0x00000000
     
    kfdhdb.ub4spare[3]:                   0 ; 0x164: 0x00000000
     
    kfdhdb.ub4spare[4]:                   0 ; 0x168: 0x00000000
     
    kfdhdb.ub4spare[5]:                   0 ; 0x16c: 0x00000000
     
    kfdhdb.ub4spare[6]:                   0 ; 0x170: 0x00000000
     
    kfdhdb.ub4spare[7]:                   0 ; 0x174: 0x00000000
     
    kfdhdb.ub4spare[8]:                   0 ; 0x178: 0x00000000
     
    kfdhdb.ub4spare[9]:                   0 ; 0x17c: 0x00000000
     
    kfdhdb.ub4spare[10]:                  0 ; 0x180: 0x00000000
     
    kfdhdb.ub4spare[11]:                  0 ; 0x184: 0x00000000
     
    kfdhdb.ub4spare[12]:                  0 ; 0x188: 0x00000000
     
    kfdhdb.ub4spare[13]:                  0 ; 0x18c: 0x00000000
     
    kfdhdb.ub4spare[14]:                  0 ; 0x190: 0x00000000
     
    kfdhdb.ub4spare[15]:                  0 ; 0x194: 0x00000000
     
    kfdhdb.ub4spare[16]:                  0 ; 0x198: 0x00000000
     
    kfdhdb.ub4spare[17]:                  0 ; 0x19c: 0x00000000
     
    kfdhdb.ub4spare[18]:                  0 ; 0x1a0: 0x00000000
     
    kfdhdb.ub4spare[19]:                  0 ; 0x1a4: 0x00000000
     
    kfdhdb.ub4spare[20]:                  0 ; 0x1a8: 0x00000000
     
    kfdhdb.ub4spare[21]:                  0 ; 0x1ac: 0x00000000
     
    kfdhdb.ub4spare[22]:                  0 ; 0x1b0: 0x00000000
     
    kfdhdb.ub4spare[23]:                  0 ; 0x1b4: 0x00000000
     
    kfdhdb.ub4spare[24]:                  0 ; 0x1b8: 0x00000000
     
    kfdhdb.ub4spare[25]:                  0 ; 0x1bc: 0x00000000
     
    kfdhdb.ub4spare[26]:                  0 ; 0x1c0: 0x00000000
     
    kfdhdb.ub4spare[27]:                  0 ; 0x1c4: 0x00000000
     
    kfdhdb.ub4spare[28]:                  0 ; 0x1c8: 0x00000000
     
    kfdhdb.ub4spare[29]:                  0 ; 0x1cc: 0x00000000
     
    kfdhdb.ub4spare[30]:                  0 ; 0x1d0: 0x00000000
     
    kfdhdb.acdb.aba.seq:                  0 ; 0x1d4: 0x00000000
     
    kfdhdb.acdb.aba.blk:                  0 ; 0x1d8: 0x00000000
     
    kfdhdb.acdb.ents:                     0 ; 0x1dc: 0x0000
     
    kfdhdb.acdb.ub2spare:                 0 ; 0x1de: 0x0000
     
    Modifying the header
    Completed phase 2

    Completed.

    Check v$asm_diskgroup:

    SQL> select inst_id,name, state from gv$asm_diskgroup;
     
       INST_ID NAME                           STATE
    ---------- ------------------------------ -----------
             1 RECONEW                        DISMOUNTED
             1 DATA                           CONNECTED
             1 OCRVOTE                        MOUNTED
             2 RECONEW                        DISMOUNTED
             2 DATA                           CONNECTED
             2 OCRVOTE                        MOUNTED
     
    6 rows selected.

    The name was changed normally.

    Mount Diskgroup

    # Node 1
    $ asmcmd
    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  EXTERN  N         512             512   4096  4194304     29696    11028                0           11028              0             N  DATA/
    MOUNTED  NORMAL  N         512             512   4096  4194304      6144     5108             2048            1530              0             Y  OCRVOTE/
    ASMCMD> mount RECONEW
    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  EXTERN  N         512             512   4096  4194304     29696    11028                0           11028              0             N  DATA/
    MOUNTED  NORMAL  N         512             512   4096  4194304      6144     5108             2048            1530              0             Y  OCRVOTE/
    MOUNTED  EXTERN  N         512             512   4096  4194304    101376    86848                0           86848              0             N  RECONEW/
     
    # Node 2
    $ asmcmd
    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  EXTERN  N         512             512   4096  4194304     29696    11028                0           11028              0             N  DATA/
    MOUNTED  NORMAL  N         512             512   4096  4194304      6144     5108             2048            1530              0             Y  OCRVOTE/
    ASMCMD> mount RECONEW
    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  EXTERN  N         512             512   4096  4194304     29696    11028                0           11028              0             N  DATA/
    MOUNTED  NORMAL  N         512             512   4096  4194304      6144     5108             2048            1530              0             Y  OCRVOTE/
    MOUNTED  EXTERN  N         512             512   4096  4194304    101376    86848                0           86848              0             N  RECONEW/

    The Diskgroup was mounted normally.


    2. Renaming a disk group with DB data

    (The remainder of the disk group renaming process with DB data, such as finding file paths, generating dynamic rename scripts, and re-mounting after the rename follows the exact same pattern and commands.)

    Check DBF file paths:

    SQL> 
    set lines 200 pages 1000
    col name for a50
    select file#, name from v$datafile;
     
         FILE# NAME
    ---------- --------------------------------------------------
             1 +DATA/ORA19DB/DATAFILE/system.274.1201188459
             2 +DATA/ORA19DB/DATAFILE/sysaux.275.1201188461
             3 +DATA/ORA19DB/DATAFILE/undotbs1.276.1201188463
             4 +DATA/ORA19DB/DATAFILE/undotbs2.278.1201188471
             5 +DATA/ORA19DB/DATAFILE/users.279.1201188471

    Change paths:

    SQL> 
    select 'alter database rename file '''||name||''' to '''||REGEXP_REPLACE(name, '^\+DATA/', '+DATANEW/')||''';' cmd
    from v$datafile;
     
    CMD
    ------------------------------------------------------------------------------------------------------------------------------------
    alter database rename file '+DATA/ORA19DB/DATAFILE/system.274.1201188459' to '+DATANEW/ORA19DB/DATAFILE/system.274.1201188459';
    alter database rename file '+DATA/ORA19DB/DATAFILE/sysaux.275.1201188461' to '+DATANEW/ORA19DB/DATAFILE/sysaux.275.1201188461';
    alter database rename file '+DATA/ORA19DB/DATAFILE/undotbs1.276.1201188463' to '+DATANEW/ORA19DB/DATAFILE/undotbs1.276.1201188463';
    alter database rename file '+DATA/ORA19DB/DATAFILE/undotbs2.278.1201188471' to '+DATANEW/ORA19DB/DATAFILE/undotbs2.278.1201188471';
    alter database rename file '+DATA/ORA19DB/DATAFILE/users.279.1201188471' to '+DATANEW/ORA19DB/DATAFILE/users.279.1201188471';
     
    SQL> 
    select 'alter database rename file '''||name||''' to '''||REGEXP_REPLACE(name, '^\+DATA/', '+DATANEW/')||''';' cmd
    from v$tempfile;
     
    CMD
    -------------------------------------------------------------------------------------------------------------------------------
    alter database rename file '+DATA/ORA19DB/TEMPFILE/temp.277.1201188465' to '+DATANEW/ORA19DB/TEMPFILE/temp.277.1201188465';

    Execute all the generated SQL commands:

    SQL>
    alter database rename file '+DATA/ORA19DB/DATAFILE/system.274.1201188459' to '+DATANEW/ORA19DB/DATAFILE/system.274.1201188459';
    alter database rename file '+DATA/ORA19DB/DATAFILE/sysaux.275.1201188461' to '+DATANEW/ORA19DB/DATAFILE/sysaux.275.1201188461';
    alter database rename file '+DATA/ORA19DB/DATAFILE/undotbs1.276.1201188463' to '+DATANEW/ORA19DB/DATAFILE/undotbs1.276.1201188463';
    alter database rename file '+DATA/ORA19DB/DATAFILE/undotbs2.278.1201188471' to '+DATANEW/ORA19DB/DATAFILE/undotbs2.278.1201188471';
    alter database rename file '+DATA/ORA19DB/DATAFILE/users.279.1201188471' to '+DATANEW/ORA19DB/DATAFILE/users.279.1201188471';
    alter database rename file '+DATA/ORA19DB/TEMPFILE/temp.277.1201188465' to '+DATANEW/ORA19DB/TEMPFILE/temp.277.1201188465';

    Check DBF file paths:

    SQL> 
    set lines 200 pages 1000
    col name for a50
    select file#, name from v$datafile;
     
         FILE# NAME
    ---------- --------------------------------------------------
             1 +DATANEW/ORA19DB/DATAFILE/system.274.1201188459
             2 +DATANEW/ORA19DB/DATAFILE/sysaux.275.1201188461
             3 +DATANEW/ORA19DB/DATAFILE/undotbs1.276.1201188463
             4 +DATANEW/ORA19DB/DATAFILE/undotbs2.278.1201188471
             5 +DATANEW/ORA19DB/DATAFILE/users.279.1201188471

    Paths changed normally.

    Check temp file paths:

    SQL> 
    set lines 200 pages 1000
    col name for a50
    select file#, name from v$tempfile;
     
         FILE# NAME
    ---------- --------------------------------------------------
             1 +DATANEW/ORA19DB/TEMPFILE/temp.277.1201188465

    Paths changed normally.

    Check Redo log paths:

    SQL>
    set lines 200
    set pages 1000
    col member for a60
    select l.group#, member, archived, l.status, (bytes/1024/1024) MB
    from v$log l, v$logfile f
    where f.group# = l.group#
    order by 1;
     
        GROUP# MEMBER                                                       ARC STATUS                   MB
    ---------- ------------------------------------------------------------ --- ---------------- ----------
             1 +DATA/ORA19DB/ONLINELOG/group_1.272.1201188457               YES INACTIVE                200
             2 +DATA/ORA19DB/ONLINELOG/group_2.273.1201188459               YES INACTIVE                200
             3 +DATA/ORA19DB/ONLINELOG/group_3.280.1201189697               NO  CURRENT                 200
             4 +DATA/ORA19DB/ONLINELOG/group_4.281.1201189697               YES INACTIVE                200

    Generate commands to rename Redo paths:

    SQL>
    select 'alter database rename file '''||member||''' to '''||REGEXP_REPLACE(member, '^\+DATA/', '+DATANEW/')||''';' cmd
    from v$logfile;
     
    CMD
    -------------------------------------------------------------------------------------------------------------------------------------
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_1.272.1201188457' to '+DATANEW/ORA19DB/ONLINELOG/group_1.272.1201188457';
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_2.273.1201188459' to '+DATANEW/ORA19DB/ONLINELOG/group_2.273.1201188459';
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_3.280.1201189697' to '+DATANEW/ORA19DB/ONLINELOG/group_3.280.1201189697';
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_4.281.1201189697' to '+DATANEW/ORA19DB/ONLINELOG/group_4.281.1201189697';

    Execute Redo path rename commands:

    SQL>
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_1.272.1201188457' to '+DATANEW/ORA19DB/ONLINELOG/group_1.272.1201188457';
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_2.273.1201188459' to '+DATANEW/ORA19DB/ONLINELOG/group_2.273.1201188459';
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_3.280.1201189697' to '+DATANEW/ORA19DB/ONLINELOG/group_3.280.1201189697';
    alter database rename file '+DATA/ORA19DB/ONLINELOG/group_4.281.1201189697' to '+DATANEW/ORA19DB/ONLINELOG/group_4.281.1201189697';

    Recheck Redo paths:

    SQL>
    set lines 200
    set pages 1000
    col member for a60
    select l.group#, member, archived, l.status, (bytes/1024/1024) MB
    from v$log l, v$logfile f
    where f.group# = l.group#
    order by 1;
     
        GROUP# MEMBER                                                       ARC STATUS                   MB
    ---------- ------------------------------------------------------------ --- ---------------- ----------
             1 +DATANEW/ORA19DB/ONLINELOG/group_1.272.1201188457            YES INACTIVE                200
             2 +DATANEW/ORA19DB/ONLINELOG/group_2.273.1201188459            YES INACTIVE                200
             3 +DATANEW/ORA19DB/ONLINELOG/group_3.280.1201189697            NO  CURRENT                 200
             4 +DATANEW/ORA19DB/ONLINELOG/group_4.281.1201189697            YES INACTIVE                200

    Paths changed normally.

    Switch DB to open state:

    SQL> alter database open;
     
    Database altered.
     
    SQL> select * from v$recover_file;
     
    no rows selected

    Started normally.

    Change password file path:

    $ srvctl modify database -d ora19db -pwfile '+DATANEW/ora19db/PASSWORD/pwdora19db.270.1201188441'
    
    $ srvctl config database -d ora19db
    Database unique name: ORA19DB
    Database name:
    Oracle home: /oracle/app/oracle/product/19c
    Oracle user: oracle
    Spfile: +datanew/ora19db/parameterfile/spfile.294.1203586513
    Password file: +DATANEW/ora19db/PASSWORD/pwdora19db.270.1201188441
    Domain:
    Start options: open
    Stop options: immediate
    Database role: PRIMARY
    Management policy: AUTOMATIC
    Server pools:
    Disk Groups: DATA,DATANEW
    Mount point paths:
    Services:
    Type: RAC
    Start concurrency:
    Stop concurrency:
    OSDBA group: dba
    OSOPER group: dba
    Database instances: ORA19DB1,ORA19DB2
    Configured nodes: ora19rac1,ora19rac2
    CSS critical: no
    CPU count: 0
    Memory target: 0
    Maximum memory: 0
    Default network number for database services:
    Database is administrator managed

    Changed normally.


  • Grid Gold Image Creation and Deployment Guide

    OS Environment: Oracle Linux 9.6 (64bit)

    DB Environment: Oracle Database 19.28.0.0


    Previously, I conducted a test of creating a DB engine as a gold image and cloning it. Reference: Cloning a DB Engine Using Oracle 19c Gold Image ( https://positivemh.tistory.com/1149 )

    This article explains how to create and deploy a Grid Gold Image on a server where 19c Grid (Restart) is installed.

    What is a Gold Image? Simply put, it’s a copy of the Oracle engine. You can also bundle the Oracle engine path using the tar command to clone or move it elsewhere. It works for a patched engine as well, and if the server OS is the same, it can be moved to another server. By creating a gold image of a clean Oracle installation, it’s suitable for deploying standardized installation images across multiple servers. It’s easy to manage and deploy, but custom settings (such as network/admin/.ora files and dbs/.ora files) or log files are not included, so these parts need to be managed separately. For reference, it is said that the gold images for Restart and RAC must be created separately because the components that make up the engine are different.


    Usage

    1. Check the existing Grid patch status

    $ cd $GRID_HOME/OPatch
    $ ./opatch lspatches -oh $GRID_HOME
    38124772;TOMCAT RELEASE UPDATE 19.0.0.0.0 (38124772)
    37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
    37962938;ACFS RELEASE UPDATE 19.28.0.0.0 (37962938)
    37960098;Database Release Update : 19.28.0.0.250715 (37960098)
    36758186;DBWLM RELEASE UPDATE 19.0.0.0.0 (36758186)
    OPatch succeeded.

    It’s version 19.28.

    2. Stop all Oracle-related processes

    # crsctl stop crs

    3. Create Gold Image Create a directory to save the gold image:

    $ mkdir -p /home/oracle/19c_img

    Create the gold image:

    $ cd $GRID_HOME
    $ ./gridSetup.sh -createGoldImage \
       -destinationLocation /home/oracle/19c_img \
       -silent \
       -name gi_19_28_restart.zip
     
    Successfully Setup Software.
    Gold Image location: /home/oracle/19c_img/gi_19_28_restart.zip

    Check the created file:

    $ ls -al /home/oracle/19c_img/
    total 5974040
    drwxr-xr-x. 2 oracle oinstall         34 Dec 21 17:02 .
    drwx------. 7 oracle oinstall       4096 Dec 21 17:01 ..
    -rw-r--r--. 1 oracle oinstall 6117412183 Dec 21 17:02 gi_19_28_restart.zip

    It was created normally.

    4. Deploy Gold Image Copy the gold image to the new server:

    $ cd /home/oracle/19c_img
    $ scp gi_19_28_restart.zip 192.168.137.60:/app/media/

    Grant permissions for the gold image on the new server:

    # chown oracle:dba /app/media/gi_19_28_restart.zip

    (Proceed after applying all prerequisites before installing Grid)

    Create the engine path and unzip on the new server:

    $ mkdir -p $GRID_HOME
    $ cd $GRID_HOME
    $ unzip -q /app/media/gi_19_28_restart.zip

    Run gridSetup in silent mode:

    $ cd $GRID_HOME
    $ ./gridSetup.sh -silent \
    INVENTORY_LOCATION=/app/oraInventory \
    SELECTED_LANGUAGES=en \
    ORACLE_BASE=/app/oracle \
    oracle.install.option=HA_CONFIG \
    oracle.install.asm.OSDBA=dba \
    oracle.install.asm.OSOPER=dba \
    oracle.install.asm.OSASM=dba \
    oracle.install.crs.config.autoConfigureClusterNodeVIP=false \
    oracle.install.asm.diskGroup.name=DATA \
    oracle.install.asm.diskGroup.redundancy=EXTERNAL \
    oracle.install.asm.diskGroup.diskDiscoveryString=ORCL:* \
    oracle.install.asm.diskGroup.disks=ORCL:DATA \
    oracle.install.asm.SYSASMPassword=oracle \
    oracle.install.asm.monitorPassword=oracle \
    -ignorePrereqFailure
     
    #logs
    Launching Oracle Grid Infrastructure Setup Wizard...
     
    [WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
       CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
       ACTION: Provide a password that conforms to the Oracle recommended standards.
    [WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
       CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
       ACTION: Provide a password that conforms to the Oracle recommended standards.
    [WARNING] [INS-41808] Possible invalid choice for OSASM Group.
       CAUSE: The name of the group you selected for the OSASM group is commonly used to grant other system privileges (For example: asmdba, asmoper, dba, oper).
       ACTION: Oracle recommends that you designate asmadmin as the OSASM group.
    [WARNING] [INS-41809] Possible invalid choice for OSDBA Group.
       CAUSE: The group name you selected as the OSDBA for ASM group is commonly used for Oracle Database administrator privileges.
       ACTION: Oracle recommends that you designate asmdba as the OSDBA for ASM group, and that the group should not be the same group as an Oracle Database OSDBA group.
    [WARNING] [INS-41810] Possible invalid choice for OSOPER Group.
       CAUSE: The group name you selected as the OSOPER for ASM group is commonly used for Oracle Database administrator privileges.
       ACTION: Oracle recommends that you designate asmoper as the OSOPER for ASM group, and that the group should not be the same group as an Oracle Database OSOPER group.
    [WARNING] [INS-41813] OSDBA for ASM, OSOPER for ASM, and OSASM are the same OS group.
       CAUSE: The group you selected for granting the OSDBA for ASM group for database access, and the OSOPER for ASM group for startup and shutdown of Oracle ASM, is the same group as the OSASM group, whose members have SYSASM privileges on Oracle ASM.
       ACTION: Choose different groups as the OSASM, OSDBA for ASM, and OSOPER for ASM groups.
    [WARNING] [INS-13014] Target environment does not meet some optional requirements.
       CAUSE: Some of the optional prerequisites are not met. See logs for details. gridSetupActions2025-12-21_05-28-32PM.log
       ACTION: Identify the list of failed prerequisite checks from the log: gridSetupActions2025-12-21_05-28-32PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
    The response file for this session can be found at:
     /app/grid/product/19c/install/response/grid_2025-12-21_05-28-32PM.rsp
     
    You can find the log of this install session at:
     /tmp/GridSetupActions2025-12-21_05-28-32PM/gridSetupActions2025-12-21_05-28-32PM.log
     
     
    As a root user, execute the following script(s):
            1. /app/oraInventory/orainstRoot.sh
            2. /app/grid/product/19c/root.sh
     
    Execute /app/grid/product/19c/root.sh on the following nodes:
    [oel9reco]
     
     
    Successfully Setup Software with warning(s).
    As install user, execute the following command to complete the configuration.
            /app/grid/product/19c/gridSetup.sh -executeConfigTools -responseFile /app/grid/product/19c/install/response/grid_2025-12-21_05-28-32PM.rsp [-silent]
    Note: The required passwords need to be included in the response file.
     
     
    Moved the install session logs to:
     /app/oraInventory/logs/GridSetupActions2025-12-21_05-28-32PM

    Execute scripts as root user:

    # /app/oraInventory/orainstRoot.sh
    Changing permissions of /app/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.
     
    Changing groupname of /app/oraInventory to oinstall.
    The execution of the script is complete.
     
    # /app/grid/product/19c/root.sh
    Check /app/grid/product/19c/install/root_oel9reco_2025-12-21_17-34-44-259730534.log for the output of root script

    Input password section in the rsp file:

    $ vi /app/grid/product/19c/install/response/grid_2025-12-21_05-28-32PM.rsp
    ..
    oracle.install.asm.SYSASMPassword=oracle
    ..
    oracle.install.asm.monitorPassword=oracle
    

    Re-execute gridSetup (use the rsp file generated at the end of the first gridSetup execution):

    # su - oracle
    $ /app/grid/product/19c/gridSetup.sh -silent -executeConfigTools -responseFile /app/grid/product/19c/install/response/grid_2025-12-21_05-28-32PM.rsp
    Launching Oracle Grid Infrastructure Setup Wizard...
     
    You can find the logs of this session at:
    /app/oraInventory/logs/GridSetupActions2025-12-21_05-38-51PM
     
    Successfully Configured Software.

    Completed.

    5. Check Grid status

    $ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  ONLINE       oel9reco                 STABLE
    ora.LISTENER.lsnr
                   ONLINE  OFFLINE      oel9reco                 STABLE
    ora.asm
                   ONLINE  ONLINE       oel9reco                 Started,STABLE
    ora.ons
                   OFFLINE OFFLINE      oel9reco                 STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.cssd
          1        ONLINE  ONLINE       oel9reco                 STABLE
    ora.diskmon
          1        OFFLINE OFFLINE                               STABLE
    ora.evmd
          1        ONLINE  ONLINE       oel9reco                 STABLE
    --------------------------------------------------------------------------------

    Grid was installed well.

    6. Check Grid patch status

    $ cd $GRID_HOME/OPatch
    $ ./opatch lspatches -oh $GRID_HOME
    38124772;TOMCAT RELEASE UPDATE 19.0.0.0.0 (38124772)
    37962946;OCW RELEASE UPDATE 19.28.0.0.0 (37962946)
    37962938;ACFS RELEASE UPDATE 19.28.0.0.0 (37962938)
    37960098;Database Release Update : 19.28.0.0.250715 (37960098)
    36758186;DBWLM RELEASE UPDATE 19.0.0.0.0 (36758186)
     
    OPatch succeeded.

    It was well installed with version 19.28.

    Afterward, mount the disk group, then proceed with the procedures such as DB engine installation and DB configuration.

    References:
    https://positivemh.tistory.com/1327
    https://positivemh.tistory.com/1321
    https://positivemh.tistory.com/1322
    https://dohdatabase.com/2023/07/24/how-to-clone-oracle-grid-infrastructure-home-using-golden-images/
    Bug 35578393 – Warnings During Oracle Gateway pg4appc after 19c(19.19) install on ol9 (Doc ID 35578393.8)
    19c regular client installation on OL9/RHEL9 using Silent method aborted after relink error “Error in invoking target ‘client_sharedlib’ of makefile ‘$ORACLE_HOME/rdbms/lib/ins_rdbms.mk’” (Doc ID 3008635.1)
    Requirements for Installing Oracle Database/Client 19c (19.22 or higher) on OL9 or RHEL9 64-bit (x86-64) (Doc ID 2982833.1)
    19.x: ./runInstaller failed with ” PRVF-7532 : Package “compat-libcap1” is missing on node “(HOSTNAME)” ” on OL9/RHEL9 (Doc ID 3018358.1)
    19c Database Installation/relink fails with :”Error in invoking target ‘libasmclntsh19.ohso libasmperl19.ohso client_sharedlib’ of makefile ins_rdbms.mk ” (Doc ID 2760289.1)
    Primary Note of Linux OS Requirements for Database Server (Doc ID 851598.1)
    OL9:ORA-15186: ASMLIB Error Function = [asm_init] [io_uring not permitted for this process] (Doc ID 3108578.1)
    ASM and Database Services Not Starting After 19.27 RU Patching (STANDALONE) (Doc ID 3092401.1)
    https://docs.oracle.com/en/database/oracle/oracle-database/19/cwlin/supported-oracle-linux-9-distributions-for-x86-64.html
    https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/supported-oracle-linux-9-distributions-for-x86-64.html
    https://yum.oracle.com/repo/OracleLinux/OL9/addons/x86_64/index.html
    https://www.oracle.com/linux/downloads/linux-asmlib-v9-downloads.html
    https://docs.oracle.com/en/operating-systems/oracle-linux/asmlib/
    https://dataforum.io/pages/viewpage.action?pageId=5734410
    https://dev.to/vahidusefzadeh/installing-oracle-grid-infrastructure-1925-on-oracle-linux-95-using-asmlib-3-4bki
    https://blog.purestorage.com/purely-technical/installation-configuration-oracle-asmlib-v3-1-on-oracle-linux-9/
    https://positivemh.tistory.com/765
    https://positivemh.tistory.com/175

  • Oracle 19c OCR, Voting Disk Relocation


    OS Environment: Oracle Linux 8.1 (64-bit)
    Database Environment: Oracle Database 19.3.0.0

    In scenarios where OCR and Voting Disks were initially configured on the same disk group (+OCR), this guide describes how to move the voting disks to a separate disk group (+VOTE), which was created for separation purposes.


    1. Check Current OCR Location

    $ ocrcheck
    Status of Oracle Cluster Registry is as follows :
             Version                  :          4
             Total space (kbytes)     :     901284
             Used space (kbytes)      :      84372
             Available space (kbytes) :     816912
             ID                       : 1645669115
             Device/File Name         :       +OCR
                                        Device/File integrity check succeeded
                                        Device/File not configured
                                        ...
             Cluster registry integrity check succeeded
             Logical corruption check bypassed due to non-privileged user

    OCR is currently located on +OCR.


    2. Check Current Voting Disk Location

    $ crsctl query css votedisk
    ##  STATE    File Universal Id                File Name Disk group
    --  -----    -----------------                --------- ----------
     1. ONLINE   7af4d351969b4faf... (/dev/oracleasm/disks/OCR1) [OCR]
     2. ONLINE   bfc984baab224f3d... (/dev/oracleasm/disks/OCR2) [OCR]
     3. ONLINE   a4f208fc8d054f79... (/dev/oracleasm/disks/OCR3) [OCR]

    Voting disks are also located in +OCR.


    3. Create a New Disk Group for Voting Disks

    $ export ORACLE_SID=+ASM1
    $ export ORACLE_HOME=$GRID_HOME
    $ sqlplus / as sysasm
    SQL> create diskgroup vote normal redundancy 
         disk '/dev/oracleasm/disks/VOTE1',
              '/dev/oracleasm/disks/VOTE2',
              '/dev/oracleasm/disks/VOTE3';

    4. Confirm Disk Group Creation

    SQL> select inst_id, name, state, type from gv$asm_diskgroup;
    
    INST_ID | NAME | STATE   | TYPE
    --------|------|---------|------
    1       | OCR  | MOUNTED | NORMAL
    1       | VOTE | MOUNTED | NORMAL
    2       | OCR  | MOUNTED | NORMAL
    2       | VOTE | DISMOUNTED

    The VOTE disk group is not yet mounted on instance 2.


    5. Mount the Disk Group on the Second Node

    $ export ORACLE_SID=+ASM2
    $ export ORACLE_HOME=$GRID_HOME
    $ sqlplus / as sysasm
    SQL> alter diskgroup vote mount;

    6. Confirm Disk Group is Mounted on Both Nodes

    SQL> select inst_id, name, state, type from gv$asm_diskgroup;
    
    INST_ID | NAME | STATE   | TYPE
    --------|------|---------|------
    1       | OCR  | MOUNTED | NORMAL
    1       | VOTE | MOUNTED | NORMAL
    2       | OCR  | MOUNTED | NORMAL
    2       | VOTE | MOUNTED | NORMAL

    7. Replace the Voting Disks

    $ crsctl replace votedisk +VOTE
    Successful addition of voting disk cbf4fb6df0f74f0abf837753f6ba09a7.
    Successful addition of voting disk b11b725601094f8dbf461a937a2bdccd.
    Successful addition of voting disk e1875e40a1274f26bf8cc6dd9b74d368.
    Successful deletion of voting disk 7af4d351969b4fafbf3820a280eda284.
    Successful deletion of voting disk bfc984baab224f3dbf95225711a3735d.
    Successful deletion of voting disk a4f208fc8d054f79bfedf9c512ef5514.
    Successfully replaced voting disk group with +VOTE.
    CRS-4266: Voting file(s) successfully replaced

    8. Verify the New Voting Disk Location

    $ crsctl query css votedisk
    ##  STATE    File Universal Id                File Name Disk group
    --  -----    -----------------                --------- ----------
     1. ONLINE   cbf4fb6df0f74f0a... (/dev/oracleasm/disks/VOTE1) [VOTE]
     2. ONLINE   b11b725601094f8d... (/dev/oracleasm/disks/VOTE2) [VOTE]
     3. ONLINE   e1875e40a1274f26... (/dev/oracleasm/disks/VOTE3) [VOTE]
    Located 3 voting disk(s).

    Voting disks are now successfully relocated to the +VOTE disk group.


  • Hello, I’m Youngmin Park.

    Hello, I’m Youngmin Park.
    After running a technical blog in Korean for some time, I’ve decided to start this English blog to share my experiences with a broader audience.
    My original blog (in Korean) is available at: https://positivemh.tistory.com

    I work as an Oracle DBA in South Korea, and through this blog, I plan to document and share various issues I’ve encountered, tests I’ve conducted, and insights I’ve gained in the field.
    Some of these lessons were learned the hard way, and I hope that by sharing them here, they might help others solve similar problems more efficiently.

    While I do my best to ensure the accuracy of the content, please note that results may vary depending on your environment. I highly recommend testing any configuration or method in your own setup before applying it to production.

    This blog is both a space for sharing and for learning.
    If you have any questions or thoughts, feel free to reach out via comments or email.

    Thank you for visiting.

    📧 Email: ympark.pro@gmail.com
    🔗 LinkedIn: https://www.linkedin.com/in/positive-youngmin-park/

    — Youngmin Park