Databases Reference
In-Depth Information
Now, modify the contents of the newname.sql script to reflect the directories on the destination database server.
Here is what the final newname.sql script looks like for this example:
run{
set newname for datafile 1 to '/ora01/dbfile/DEVDB/system01.dbf';
set newname for datafile 2 to '/ora01/dbfile/DEVDB/sysaux01.dbf';
set newname for datafile 3 to '/ora01/dbfile/DEVDB/undotbs01.dbf';
set newname for datafile 4 to '/ora01/dbfile/DEVDB/users01.dbf';
restore database;
switch datafile all;
}
Now, connect to RMAN and run the prior script to restore the data files to the new locations:
$ rman target /
RMAN> @newname.sql
Here is a snippet of the output for this example:
datafile 1 switched to datafile copy
input datafile copy RECID=5 STAMP=790357985 file name=/ora01/dbfile/DEVDB/system01.dbf
All of the data files have been restored to the new database server. You can use the RMAN report schema
command to verify that the files have been restored and are in the correct locations:
RMAN> report schema;
Here is some sample output:
RMAN-06139: WARNING: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name O12C
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 500 SYSTEM *** /ora01/dbfile/DEVDB/system01.dbf
2 500 SYSAUX *** /ora01/dbfile/DEVDB/sysaux01.dbf
3 800 UNDOTBS1 *** /ora01/dbfile/DEVDB/undotbs01.dbf
4 50 USERS *** /ora01/dbfile/DEVDB/users01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 500 TEMP 500 /u01/dbfile/o12c/temp01.dbf
From the prior output, the database name and temporary tablespace data file still don't reflect the destination
database (DEVDB). Those will be modified in subsequent steps.
Search WWH ::




Custom Search