Start a new instance name NewData
1, Prepare Pfile
CP ..../dbs/init.ora./dbs/initnewdata.ora
Vim Initnewdata.ora
Change the position of Controlfile
control_files= '/u01/app/oracle/oradata/newdata/control.ctl '
2. Create SPFile
Sqlplus/as SYSDBA
Startup Pfile= ' ..../dbs/initnewdata.ora ' Nomount;
Create SPFile from Pfile;
Shutdown immediate;
Startup Nomount;
3. Copy the seed control file
cp/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/seed_database.ctl/u01/app/oracle/oradata/ NewData
ALTER DATABASE Mount;
4. Copy the seed data file backup slice
cp/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/seed_database.dfb/u01/app/oracle/oradata/ NewData
5, Import data backup piece information to control file
Rman
Connect Target/
Delete noprompt backupset 1;
Catalog start with '/U01/APP/ORACLE/ORADATA/NEWDATA/SEED_DATABASE.DFB ';
6. Restore and restore the database
Run {
Set newname for datafile '/ade/b/2125410156/oracle/oradata/seeddata/system01.dbf ' to '/u01/app/oracle/oradata/raw/ SYSTEM01.DBF ';
Set newname for datafile '/ade/b/2125410156/oracle/oradata/seeddata/sysaux01.dbf ' to '/u01/app/oracle/oradata/raw/ SYSAUX01.DBF ';
Set newname for datafile '/ade/b/2125410156/oracle/oradata/seeddata/undotbs01.dbf ' to '/u01/app/oracle/oradata/raw/ UNDOTBS01.DBF ';
Set newname for datafile '/ade/b/2125410156/oracle/oradata/seeddata/usres01.dbf ' to '/u01/app/oracle/oradata/raw/ USERS01.DBF ';
Restore database;
Recover database;
}
7. Open the Database
ALTER DATABASE open resetlogs;
Oracle restores the seed database with Rman