Thursday, March 11, 2010

Oracle Inventory Creationg/Attach/Dettach/Clone/Relink Code tree

1. Point the inventory to correct location

Make sure the file ./etc/oraInst.loc.,  ./var/opt/oracle/oraInst.loc. & $ORACLE_HOME/oraInst.loc. has the following entries.  If not modify the file and save.

inventory_loc=/oracle/product/oraInventory
inst_group=dba

2. Clone the code tree

+ cd $ORACLE_HOME/oui/bin
+ ./runInstaller -silent -clone -invPtrLoc $ORACLE_HOME/oraInst.loc -ignorePreReq  ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=Ora10204_TEST ORACLE_HOST_NAME=test-01


!!! Please wait until the command is successful.  Do not interrupt.  !!!
Please check for .cloning is successful. message and will display message to run
.root.sh..  Sometime it may wait for you see this message.  Press .enter. to get
the .command prompt..

Run the following ,
+ cp /oracle/product/10.2.0.4//root.sh /oracle/product/10.2.0.4

+sudo /oracle/product/10.2.0.4//root.sh

Accept the default options for the prompts and location of the files.

3. Detach the code tree from oracle central inventory

+ cd $ORACLE_HOME/oui/bin
+./runInstaller -silent -detachHome -local -noClusterEnabled -invPtrLoc $ORACLE_HOME/oraInst.loc -ignorePreReq ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=Ora10204_TEST


4. Attach the code tree to oracle central inventory . This will add correct host to the inventory

+ cd $ORACLE_HOME/oui/bin
+./runInstaller -silent -attachHome -local -noClusterEnabled -invPtrLoc $ORACLE_HOME/oraInst.loc -ignorePreReq ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=Ora10204_TEST CLUSTER_NODES=test-01


5. Relink the code tree

find . -type l -exec ls -l {} \; | grep -i [oldsid] | awk '{print "rm -f "$9";ln -s "$11" "$9}' 
 execute the above command to check any softlinks are pointing to the old env. If yes then edit the output of the above command and run them.
Then,
oraenv   ( enter SID at the prompt ).  Check the above variables are set.
Make sure correct values are set for ORACLE_HOME, PATH & LD_LIBRARY_PATH
Make sure .SHLIB_PATH. variable is NOT set.
+ cd $ORACLE_HOME/bin
+ relink all
Post a Comment

Autoconfig post 12C upgrade from 11g failed with "ORA-01804: failure to initialize timezone information"

Autoconfig post 12C upgrade from 11g failed with "ORA-01804: failure to initialize timezone information" Error DB Autoconfig ...