Monday, July 25, 2011

CLUSTER NODES details picked by OUI from ORACLE_HOME location

I was trying to simulate a live issue in our test RAC database server. we have 3 node RAC database, when we are trying to upgrade the cluster database from Oracle 10204 to 10205. we got in to some corruption issues on the sys tables. so we have planned to take the live copy of ORACLE_HOME and system related tablespaces to the our test server.

our test server has similar step to the live database. so we have copied the live RDBMS binaries(10204 Binaries) & oracle inventory & RMAN system related tablespaces from the live database.

1) we have restored the live copy of RDBMS binaries & oracle inventory
2) we have relink the RDBMS binary
3) when we start the upgrade process through OUI. on the cluster page, i could see the LIVE CLUSTER NODE Names & TEST CLUSTER NODE Names
4) i was getting 6 nodes instead of 3 nodes.

After doing alot of research, i found the place where the OUI picks the cluster node details from the Oracle RDBMS Binaries.

you can find the file from
$ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml

cd $ORACLE_HOME/inventory/ContentsXML> cat oraclehomeproperties.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2005 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->
<ORACLEHOME_INFO>
   <GUID>392927504#.#1664361443</GUID>
   <HOME/>
   <ARU_PLATFORM_INFO>
      <ARU_ID>226</ARU_ID>
      <ARU_ID_DESCRIPTION>Linux x86-64</ARU_ID_DESCRIPTION>
   </ARU_PLATFORM_INFO>
   <CLUSTER_INFO>
      <LOCAL_NODE NAME="bhuvan1"/>
      <NODE_LIST>
         <NODE NAME="bhuvan1"/>
         <NODE NAME="bhuvan2"/>
         <NODE NAME="bhuvan3"/>
      </NODE_LIST>
   </CLUSTER_INFO>
</ORACLEHOME_INFO>

NOTE: Take a backup of oraclehomeproperties.xml file before modify anything on it.

you can find the CLUSTER NODE DETAILS for CRS_HOME,ASM & RDBMS in the central inventary home

Go To CENTRAL INVENTORY HOME
$CENTRAL_INVENTORY_HOME/ContentsXML/inventory.xml
cat $CENTRAL_INVENTORY_HOME/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2005 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.1.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraCrs10g_home" LOC="/opt/oracle/product/CRS10gR2" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="bhuvan1"/>
      <NODE NAME="bhuvan2"/>
      <NODE NAME="bhuvan3"/>
   </NODE_LIST>
</HOME>
<HOME NAME="OraASM10g_home2" LOC="/opt/oracle/product/ASM10gR2" TYPE="O" IDX="3">
   <NODE_LIST>
      <NODE NAME="bhuvan1"/>
      <NODE NAME="bhuvan2"/>
      <NODE NAME="bhuvan3"/>
   </NODE_LIST>
</HOME>
<HOME NAME="OraDb10g_home1" LOC="/opt/oracle/product/DB10gR2" TYPE="O" IDX="2">
   <NODE_LIST>
      <NODE NAME="bhuvan1"/>
      <NODE NAME="bhuvan2"/>
      <NODE NAME="bhuvan3"/>
   </NODE_LIST>
</HOME>
</HOME_LIST>
</INVENTORY>


you can find the Oracle cluster node details for ASM on the below directory

$ASM_HOME/inventory/ContentsXML/oraclehomeproperties.xml

Hope it you. Happy learning :) :)



OUI-25023 When Trying To Install A Patchset On RAC


when i was trying to upgrade the RAC database on the linux server, i got the error(OUI-25023)
OUI-25023 When Trying To Install A Patchset On RAC

I got this error message while selecting the node selection page in the database upgrade.

ERROR: OUI-2502: The local node is not selected for installing this product. Include the local node in the cluster list or perform the installation on the node on which the install is to be performed.

Below command will list the nodes available in the cluster database
$ORA_CRS_HOME/bin/olsnodes -n

Below command will update the cluster node details in the inventory folder. Please take a backup of your inventory.xml file from your oracle central inventory folder ($CENTRAL_Inventory_Path/ContentsXML/inventory.xml)
Update the node list on each node by running the following command:

./runInstaller -updateNodeList "CLUSTER_NODES={bhuvan1,bhuvan2,bhuvan3}" LOCAL_NODE="bhuvan1" "ORACLE_HOME=/opt/oracle/product/DB10gR2" –local


OUTPUT
$ cd $ORACLE_HOME/oui/bin/
$ ./runInstaller -updateNodeList "CLUSTER_NODES={bhuvan1,bhuvan2,bhuvan3}" LOCAL_NODE="bhuvan1" "ORACLE_HOME=/opt/oracle/product/DB10gR2" -local
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/oracle/product/oraInventory
'UpdateNodeList' was successful.



ORACLE METALINK NOTE: OUI-25023 When Trying To Install A Patchset On RAC [ID 394868.1]

Tuesday, July 12, 2011

RMAN-12009 & RMAN-12008

I have taken a rman backup of system related tablespaces in to the disk. when i try to restore in to the new server i am got the below issues.
I tired to do the catalog start with command, but it throw me an error


RMAN> CATALOG START WITH '/mnt1/oracle/' NOPROMPT;

using target database control file instead of recovery catalog
searching for all files that match the pattern /mnt1/oracle/
no files found to be unknown to the database

RMAN> catalog backuppiece '/mnt1/oracle/smplive_SMPLIV_gtmh8n3v_1565_20110712';

catalog backuppiece '/mnt1/oracle/smplive_SMPLIV_gumh8n3v_1566_20110712';
cataloged backuppiece
backup piece handle=/mnt1/oracle/smplive_SMPLIV_gtmh8n3v_1565_20110712 recid=730 stamp=756314610

RMAN>
cataloged backuppiece
backup piece handle=/mnt1/oracle/smplive_SMPLIV_gumh8n3v_1566_20110712 recid=731 stamp=756314610




RMAN> run
2> {
3> allocate channel ch1 type disk;
4> restore tablespace  SYSTEM;
5> }

allocated channel: ch1
channel ch1: sid=1110 instance=SMPLIVL1 devtype=DISK

Starting restore at 12-JUL-11

released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/12/2011 15:13:55
RMAN-12009: command aborted because some backup pieces could not be located
RMAN-12008: could not locate backup piece /mnt1/oracle/Bhuvan_h0mh8n40_1568_20110712

RMAN> exit

SOLUTION: PLEASE CHANGE THE CLUSTER_DATABASE= FALSE; then you can start the restore. it will work. Once the restore completed then you can change the parameter to TRUE.

Monday, July 4, 2011

DROP A DATABASE USING SQLPLUS OR RMAN COMMAND PROMPT


DROP A DATABASE USING SQLPLUS COMMAND
Please find the steps to drop a cluster database using a SQLPLUS command prompt or RMAN command prompt.
I have a 4 node cluster and i am going to drop the database in the cluster environment. We need to make the cluster_database parameter to false and mount the database in the restrict mode.
STEP#1
Shutdown the cluster database by issuing
$ srvctl stop database -d BHUVAN
STEP#2
Mount one instance in the restrict mode in Oracle 10g (if it is oracle 11g, we can drop the database in the normal mode itself)
SQL> STARTUP MOUNT RESTRICT;
 
$ rman target /
 
RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT; 
 
I am using RMAN to drop all the database files including the backup which are taken for this database.
 
SQL> DROP DATABASE;
You can issue the above command, if there is no backup to clean on the disk or tape. This command will drop all the Datafiles; redo log files, control files, spfile
Note: when we specify “NO PROMPT” in the RMAN prompt, Oracle won’t ask for any confirmation before dropping the database & backup.