Think Foward Logo Tested on Oracle 8i

RMAN Script

RMAN Recover and Move Tablespaces

Updated: 24-Nov-2004
Version: 1.0

Description

RMAN Script which shows how to recover tablespaces into a different location.

The script will perform a tablespace recovery, but the datafile is restored to a different directory.  The switch command updates the controlfile for the new datafile location.  Finally apply any nessesary redo required for media recovery.  
Change the tablespace name accordingly.
To check RMAN can access files needed run check_recover_tablespace.rman first.

Parameters


SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
run { sql 'ALTER DATABASE DATAFILE 5 OFFLINE'; sql 'ALTER TABLESPACE users OFFLINE TEMPORARY'; allocate channel ch1 type disk; set newname for datafile 5 to '/uo2/oradata/dbapps/users01.dbf'; restore tablespace users; switch datafile all; recover tablespace users; sql 'ALTER TABLESPACE users ONLINE'; }

Related Links

Oracle 8i: (RMAN Script) RMAN Validate Tablespace Recovery

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links