Friday, July 7, 2017

RAC to Stand alone Restoration Oracle DB

Below doc used for a Same SID as RAC


1. Startup nomount;

Delete all the control, log , and datafiles .

Restore the controlfile from the Rman.

RMAN> restore controlfile from '/vol0/app/rman/c-1546876198-20140606-00';

2. Startup mount;

crosscheck backup;
delete EXPIRED backup;
crosscheckarchivelog all;
delete expired archivelog all;

Delete all the existing Rman backups

Catalog start with ‘new rman location’;

RMAN> catalog start with ' /vol0/RMAN';

List backup;


Run the below scripts accordingly.


**  SET UNTIL caluse removed from the script

RMAN> run {
2> 3> set newname for datafile 1 to '/vol0/app/oracle/oradata/YAMAHAR1/system.dbf';
4> set newname for datafile 2 to '/vol0/app/oracle/oradata/YAMAHAR1/SYSAUX01.dbf';
5> set newname for datafile 3 to '/vol0/app/oracle/oradata/YAMAHAR1/undotbs1.dbf';
6> set newname for datafile 4 to '/vol0/app/oracle/oradata/YAMAHAR1/undotbs2.dbf';
7> set newname for datafile 5 to '/vol0/app/oracle/oradata/YAMAHAR1/users.dbf';
8> restore database;
9> switch datafile all;
10> recover database;
12> }



SET UNTIL SEQUENCE 77 THREAD 1;
ALTER DATABASE ADD LOGFILE MEMBER '/oracle/dbs/log2b.rdo' TO GROUP 2;


--------------------------------

ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled

Solution

Add the below entry to pfile – to the last line

Shu database;

Startup mount pfile=’asdfdsfa.ora’



And
Open the database in resetlogs mode.



ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

Solution



[1] take the backup of the current control file to nay  of the directory

SQL> alter database backup controlfile to '/shared/oracle/controlnew01.ctl';

[2] create trace of the current control file 

SQL> alter database backup controlfile to trace as '/shared/oracle/controlfa.ctl';



Once the trace file is create it will contain  the script to recreate the control file
you can open the trace of the control file in the notepad and edit the creating the control file script according to your environment

Run accordingly in SQL—



And 

alter database open resetlogs;


Errors..



SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-00392: log 4 of thread 2 is being cleared, operation not allowed
ORA-00312: online log 4 thread 2: '/vol0/oradata/ROAM/redo07.log'

Solution


SQL> alter database clear logfile group 2;

Database altered.

*
ERROR at line 1:
ORA-19751: could not create the change tracking file
ORA-19750: change tracking file:
'+DATA_ETSL01/roam/changetracking/ctf.307.844435057'



Solution

SQL> alter database disable block change tracking;


-------------------------
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/PRIME/system.dbf'


solution

RMAN> list backup of archivelog all; -- add one to the highest sequence
recover database until sequence 21;

SQL> alter database open RESETLOGS;

Database altered.






















No comments:

Post a Comment