Example: Restoring and Recovering Tablespaces in the Protected Database
This example demonstrates how to restore and recover one or more tablespaces in the protected database after they are accidentally dropped or corrupted. The example assumes that the database is up and running and that you will restore only the affected tablespaces.
To restore and recover one or more tablespaces:
-
Ensure that the prerequisites described in “Prerequisites for Restoring and Recovering Data from Recovery Appliance” are met.
-
Use RMAN to connect to the protected database as
TARGETand the Recovery Appliance catalog asCATALOG.See Also: “Connecting to the Protected Database and Recovery Appliance Using CLI”
-
Restore and recover the affected tablespaces.
The following command restores and recovers the
USERStablespace:
RUN
{
SQL 'ALTER TABLESPACE users OFFLINE';
RESTORE TABLESPACE users;
RECOVER TABLESPACE users;
SQL 'ALTER TABLESPACE users ONLINE';
}