When only a subset of the data needs to be restored, a point-in-time copy of the database can be mounted on an alternate host. Administrators can export and import the data back to the original database. The original database can remain running but access to the corrupted data should be restricted. To the operating system, the LUNs presented by the snapshot will have different WWNs than the original LUNs. However, the ASM headers are the same as the original ASM devices. It is not recommended to attach these LUNs on the same host as the original database. Attaching the LUNs on the same host as the original database will create confusion to Oracle and increase the risk of writing to the wrong LUNs accidentally. The overall recovery process:
- Prepare the destination host to receive the LUNs.
- Configure the operating system similarly as the original host.
- Install the same version of Oracle software on the destination host.
- Install the same storage software (ASMLib, ASMFD) on the destination host.
- In Unisphere, identify and select the snapshot in the LUN Snapshots properties page or in the Consistency Group Snapshots properties page.
- Choose Attach to host from the More Actions drop-down menu.
- Select the destination host and allow Read/Write access.
- After the snapshot is attached to the host, scan for the LUNs using rescan-scsi-bus.sh -forcerescan or -a.
- Set ownership, group membership, and permission on the LUNs. It is possible to set ownership and membership with chown, and permission with chmod, but the change will not be persistent across reboots.
- Scan for ASM devices.
For ASMFD:
# asmcmd afd_scan
# asmcmd afd_lsdsk
For ASMLIb;
# oracleasm scandisks
# oracleasm listdisks
- Mount the ASM disk groups.
- Copy the database init parameter file to the destination host.
- Create the database log directories on the destination host.
- Start up the database in SQL*Plus.
- Restore data using one of the following methods. Data is extracted from the destination database and imported into the original database.
a. RMAN
b. Datapump
c. Copy data using the database link
Find more information in the Oracle Backup and Recovery User's Guide.
- Once the recovery is complete, shut down the database copy.
- Dismount the ASM disk groups.
- Remove the snapshot LUNs from the destination host.
- Remove host access of the snapshot LUNs in Unisphere.