Skip to content
Home » Oracle » Srvctl Modify Database Oracle Home

Srvctl Modify Database Oracle Home

New Oracle Home

After cloning a new Oracle home for the RAC database, we should report the new Oracle Home to the cluster by command srvctl modify database.

Check Oracle Home Existence

We have to make sure that the directory of Oracle home does exist on ALL nodes.

Node 1

[oracle@primary01 ~]$ [ -d "$ORACLE_HOME" ] && echo "The directory DOES exist." || echo "The directory does NOT exist."
The directory DOES exist.

Node 2

[oracle@primary02 ~]$ [ -d "$ORACLE_HOME" ] && echo "The directory DOES exist." || echo "The directory does NOT exist."
The directory DOES exist.

Check orabasetab Setting

We have to make sure that orabasetab has been set correctly on all nodes.

Node 1

[oracle@primary01 ~]$ grep $ORACLE_HOME $ORACLE_HOME/install/orabasetab
/oracle/product/19.3.0/db_1:/u01/app/oracle:OraDB19Home1:N:

Node 2

[oracle@primary02 ~]$ grep $ORACLE_HOME $ORACLE_HOME/install/orabasetab
/oracle/product/19.3.0/db_1:/u01/app/oracle:OraDB19Home1:N:

Update Oracle Home

Let's see the database configuration before modifying.

[oracle@primary01 ~]$ srvctl config database -d orclcdb
Database unique name: ORCLCDB
Database name: ORCLCDB
Oracle home: /u01/app/oracle/product/19.0.0/dbhome_1
...

If everything is ready, we can report the new Oracle home to the cluster.

[oracle@primary01 ~]$ srvctl modify database -d orclcdb -o "/oracle/product/19.3.0/db_1"

Or use the long form.

[oracle@primary01 ~]$ srvctl modify database -d orclcdb -oraclehome "/oracle/product/19.3.0/db_1"

Let's see the modified configuration.

[oracle@primary01 ~]$ srvctl config database -d orclcdb
Database unique name: ORCLCDB
Database name: ORCLCDB
Oracle home: /oracle/product/19.3.0/db_1
...

A practical case of using srvctl modify database is to clone or move the database home to another place in a cluster environment, you may have a look.

Leave a Reply

Your email address will not be published. Required fields are marked *