Friday 4 October 2013

Restoration of database from RMAN Backup



1.Install Oracle 10g(10.2.0.5) on RHEL 5.6(Required For My setup, You can install as per your Requirement

 2. Create user Oracle and set environmental variables

  export ORACLE_SID=TEST

               3.Create pfile with necessary parameters like  db_name  ,control_files,

                  Background_dump_dest

  4.Start the database in nomount Stage with the pfile.

  >Startup nomount

  5.Start RMAN and connect to the target instance

   $rman TARGET / NOCATALOG

   6.Restore the controlfile from backup piece.

                RMAN>Restore controlfile from ‘Path with backup piece Name’

                7.Catalog all the backup pieces

               RMAN>catalog backuppiece ‘Path with backup piece Name’

              Take controlfile trace and check whether all physical location for datafiles available,

              If not add set newname & switch datafile all commands to the below rman script by            

              Mentioning old path & New Path

              8.Restore and Recover.

              RMAN> run {

              2> allocate channel c1 type disk;

              3> restore database;

              4> recover database;

              5> release channel c1;

              6> }

               9. Open the database in Resetlogs option

              >Alter database open resetlogs;

Diskgroup addition 11gR2 Rac on Windows


Adding  Disk group on 2 - Node 11gr2 RAC on Windows


-->Control Panel\All Control Panel Items\Administrative Tools -->Computer Management --> Disk Management





Create a partition with required size from the Free Space.

In My setup Disk 1 is the shared storage between the Nodes. From the available 7.5 GB am going add one partition with 2GB of Size.




Dont assign drive letter.


.

Do not Format the Volume.






Refresh the Disk Management in other Node, So that the same will appear there too. In case if it has got some default drive letter in other Node, remove the drive letter.




Once the partitions are completed, I used the ASMTOOLG.EXE utility to stamp each partition with an ASM label so that Oracle can recognize these partitions as candidate disks for the ASM instance. I executed the ASMTOOLG.EXE program.

This step is mandatory, otherwise asmca utility will not identify your asmdisk.




When we add label, we could find the candidate device with 2GB of size as we created. Select the same disk and then We can add the prefix as our wish.





Once it is done Use asmca to create diskgroup using those disks.  --> Create Diskgroup




It will display the disk, which we have created. Since we have only one disk, I have used external redundancy.







Check the same in other node. Check whether the diskgroup mounted or not.




Its Done.




Issues Faced,


While trying to stamp asm header, found below error,




Error from Node 2. When I check the status of the diskgroup, it was unmounted. logged in to +ASM2 instance and then mounted those diskgroups,

>alter diskgroup dd2 mount;

Everything worked fine.