Sunday, September 4, 2022

Move or Rename Oracle 19c home

3:15 PM Posted by Dilli Raj Maharjan , No comments

      




        I installed Oracle database 19.3 in my lab with Oracle Home /u01/app/oracle/product/19.3.0. I have applied RU patches and now my Oracle database version become 19.7.0. Though the existing home did not produce any error to me it looks lit bit odd so I planned to move Oracle home to /u01/app/oracle/product/19.7.0. 

       I tried the MOS document titled How to move RAC Database ORACLE_HOME from one location to another one (Doc ID 1438719.1) but clone.pl is no longer the best option for 19c. I read a few posts and finally, the following steps worked for me.


Check if Oracle database and shut down Oracle database if it is running. Stop listener process too.

shutdown immediate
lsnrctl stop



Create a new Oracle Home with Linux mkdir command.

mkdir /u01/app/oracle/product/19.7.0


Change directory to existing Oracle Home and execute runInstaller to create gold Image.

cd $ORACLE_HOME
./runInstaller -silent  -createGoldImage -destinationLocation /u01/app/oracle/product/19.7.0


Change directory to new Oracle HOme and unzip the Gold Image.

cd /u01/app/oracle/product/19.7.0
unzip db_home_2021-08-30_05-04-53AM.zip



Create a directory dbhome_1 and move all of the content to dbhome_1. We can create the dbhome_1 directory in the earlier steps and directory extract the Gold Image to the directory.




Once the extract is completed copy the response file and modify it. Once the file is modified option values look something like the below.


Execute runInstaller. Since I am using OEL 8 I need to export CV_ASSUME_DISTID env variables before running runInstaller.

export CV_ASSUME_DISTID=OEL7.6
./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile ~/db_install.rsp \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=true



Check Inventory.

cat /u01/app/oraInventory/ContentsXML/inventory.xml




Change Environment variables.

vi ~/.bash_profile


Remove old ORACLE_HOME

cd /u01/app/oracle/product/19.3.0/dbhome_1/deinstall
./deinstall



Finally, delete the older ORACLE HOME.

rm /u01/app/oracle/product/19.3.0


















Friday, September 2, 2022

CRS-6706: Oracle Clusterware Release patch level ('') does not match Software patch level (''). Oracle Clusterware cannot be started.

12:34 PM Posted by Dilli Raj Maharjan , , No comments




If you noticed CRS-6706 error while starting cluster after patching as below. The error is due to the rootcrs.sh -prepatch not run successfully before patching. The user ran rootcrs.sh -unlock and apply the patch manually. Please follow the steps below to resolve it.

An error was noticed during cluster start.

crsctl start crs




Execute the command below as user root. The command below will sync the patch locally.

cd $GI_HOME/bin
./clscfg -localpatch


Run the command below as user root to lock the crs

cd $GI_HOME/crs/install
./rootcrs.sh -lock



Start Oracle cluster with the command below.

cd $GI_HOME/bin
./crsctl start crs



Check crs with the command below.

cd $GI_HOME/bin
./crsctl stat res -t




.





Tuesday, August 30, 2022

Fix: VBoxManage: error: Invalid machine state: Stopping

12:43 PM Posted by Dilli Raj Maharjan No comments

 maharjan-C02XFAPBJG5H:Desktop maharjan$ VBoxManage controlvm "Revera_Test" reset

VBoxManage: error: Invalid machine state: Stopping

VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component ConsoleWrap, interface IConsole, callee nsISupports

VBoxManage: error: Context: "Reset()" at line 414 of file VBoxManageControlVM.cpp

maharjan-C02XFAPBJG5H:Desktop maharjan$ VBoxManage controlvm "Revera_Test" poweroff

VBoxManage: error: The virtual machine is being powered down

VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component ConsoleWrap, interface IConsole, callee nsISupports

VBoxManage: error: Context: "PowerDown(progress.asOutParam())" at line 619 of file VBoxManageControlVM.cpp

maharjan-C02XFAPBJG5H:Desktop maharjan$

maharjan-C02XFAPBJG5H:Desktop maharjan$

maharjan-C02XFAPBJG5H:Desktop maharjan$ VBoxManage startvm "Revera_Test" --type emergencystop

maharjan-C02XFAPBJG5H:Desktop maharjan$ VBoxManage startvm "Revera_Test" --type emergencystop

VBoxManage: error: The machine 'Revera_Test' is not locked by a session

VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports

VBoxManage: error: Context: "LaunchVMProcess(a->session, sessionType.raw(), ComSafeArrayAsInParam(aBstrEnv), progress.asOutParam())" at line 727 of file VBoxManageMisc.cpp

maharjan-C02XFAPBJG5H:Desktop maharjan$