12.3 Changing the Oracle Grid Infrastructure Home Path

After installing Oracle Grid Infrastructure for a cluster (Oracle Clusterware and Oracle ASM configured for a cluster), you might need to change the location of the Grid home.

If you need to change the Grid home path, then use the following example as a guide to detach the existing Grid home, and to attach a new Grid home.

Caution:

Before changing the Grid home, you must shut down all executables that run in the Grid home directory that you are modifying. In addition, shut down all applications that use Oracle shared libraries.
  1. Login as an Administrator user or the Oracle Installation user for Oracle Grid Infrastructure (for example, grid).
  2. Change directory to Grid_home\bin and enter the command crsctl stop crs. For example:
    C:\> cd app\12.1.0\grid\BIN
    C:\..\BIN> crsctl stop crs
  3. Detach the existing Grid home.
    Run a command similar to the following command, where C:\app\12.2.0\grid is the existing Grid home location:
    C:\> cd app\12.2.0\grid\oui\bin
    C:\..\bin> gridSetup.bat -silent -detachHome ORACLE_HOME=
    'C:\app\12.2.0\grid' -local
  4. Move the installed files for Oracle Grid Infrastructure from the old Grid home to the new Grid home.
    For example, if the old Grid home is C:\app\12.2.0\grid and the new Grid home is D:\app\12c\grid, use the following command:
    C:\> xcopy C:\app\12.2.0\grid D:\app\12c\grid /E /I /H /K
  5. Clone the Oracle Grid Infrastructure installation.

    For example:

    C:\>perl clone.pl ORACLE_BASE=C:\app\grid ORACLE_HOME=C:\app\12.2.0\grid
    ORACLE_HOME_NAME=OraHome1Grid ORACLE_HOME_USER=Oracle_home_user_name
    "LOCAL_NODE=node1" "CLUSTER_NODES={node1,node2}" CRS=TRUE
    When you navigate to the Grid_home\clone\bin directory and run the clone.pl script, provide values for the input parameters that provide the path information for the new Grid home.

    Note:

    You cannot specify a different Oracle Home user when changing the Oracle Grid Infrastructure home path.
  6. Start Oracle Clusterware in the new home location.
    D:\> cd app\12c\grid\crs\install
    D:\..install\> rootcrs.bat -move -dstcrshome D:\app\12c\grid

    WARNING:

    While cloning, ensure that you do not change the Oracle home base, otherwise the move operation will fail.
  7. Repeat steps 1 through 6 on each cluster member node.