CLI cookbook: changing the SID of Oracle RAC VDBs
This topic describes how to change the SID of instances in an Oracle RAC VDB.
This example demonstrates how to switch the instance name and number between two different hosts, from
SQL> select * FROM V$ACTIVE_INSTANCES;INST_NUMBER INST_NAME----------- ------------------------------------------------------------ 1 cnrac3:VchiBEB1 2 cnrac4:VchiBEB2
to
SQL> select * FROM V$ACTIVE_INSTANCES;INST_NUMBER INST_NAME----------- ------------------------------------------------------------ 1 cnrac4:VchiBEB1 2 cnrac3:VchiBEB2
Procedure
Stop the VDB through the GUI and login to the Delphix CLI.
Select the sourceconfig of the RAC VDB whose instances you would like to rename.
CODEkfc-manual.dcenter> sourceconfigkfc-manual.dcenter sourceconfig> select Vchicago_BEB
Use the update command to change the properties of the sourceconfig.
CODEkfc-manual.dcenter sourceconfig "Vchicago_BEB"> update
Type 'ls' to view the complete list of properties associated with the VDB's sourceconfig. For configurations with larger numbers of RAC instances, the listing may not show the individual instances but will instead display [ ... ]. In order to see the instance configuration, type 'edit instances'.
CODEkfc-manual.dcenter sourceconfig "Vchicago_BEB" update *> lsProperties type: OracleRACConfig credentials: type: PasswordCredential password: ******** environmentUser: ora1024 instances: 0: type: OracleRACInstance instanceName: VchiBEB1 instanceNumber: 1 node: cnrac4 1: type: OracleRACInstance instanceName: VchiBEB2 instanceNumber: 2 node: cnrac3 linkingEnabled: true nonSysCredentials: (unset) nonSysUser: (unset) repository: '/u01/app/ora1024/product/10.2.0/db_1' services: [ ... ] user: delphix
Use the Set command to change the values for instanceName and instanceNumber for each instance.
CODEkfc-manual.dcenter sourceconfig "Vchicago_BEB" update *> set instances.0.instanceName=VchiBEB2kfc-manual.dcenter sourceconfig "Vchicago_BEB" update *> set instances.0.instanceNumber=2kfc-manual.dcenter sourceconfig "Vchicago_BEB" update *> set instances.1.instanceName=VchiBEB1kfc-manual.dcenter sourceconfig "Vchicago_BEB" update *> set instances.1.instanceNumber=1
Finally, commit the changes.
CODEkfc-manual.dcenter sourceconfig "Vchicago_BEB" update *> commit;
Restart the VDB through the GUI for the changes to take effect on the VDB.