Oracle restores the seed database with Rman

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.