DBA Hub

📋Steps in this guide1/5

Restore RAC Database from RMAN Backup Set

First of all, make sure the clusterware is Up and Running.

oracle configurationintermediate
by OracleDba
14 views
1

Overview

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[grid@prim~]$ crsctl check crs
[grid@prim~]$ crsctl status resource -t

[grid@prim~]$ asmcmd mkdir +DATA/PRIM
[grid@prim~]$ asmcmd ls -l +DATA

[oracle@prim~]$ ll /backup

[oracle@prim~]$ srvctl disable database -d prim

[oracle@prim~]$ rman target /

RMAN> startup nomount force;

RMAN> restore spfile to '/tmp/spfilePRIM.ora' from '/backup/PRIM_968055037_08u52b7j_1_1';
Then shutdown the instance.
RMAN> shutdown immediate;

Oracle instance shut down
2

Section 2

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
RMAN> create pfile='/tmp/initprim.ora' from spfile='/tmp/spfileprim.ora';

Statement processed

RMAN> startup nomount pfile='/tmp/initprim.ora';

RMAN> restore controlfile from '/backup/PRIM_968055037_08u52b7j_1_1';
Then we shutdown the instance.
RMAN> shutdown immediate;

Oracle instance shut down

[oracle@prim~]$ vi /tmp/initprim.ora
...
*.control_files='+DATA/PRIM/CONTROLFILE/current.276.1012058301'

RMAN> startup mount pfile='/tmp/initprim.ora';

[oracle@prim~]$ cat $ORACLE_HOME/dbs/init$ORACLE_SID.ora
SPFILE='+DATA/PRIM/spfilePRIM.ora'
3

Section 3

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
RMAN> create spfile='+DATA/PRIM/spfileprim.ora' from pfile='/tmp/initprim.ora';

Statement processed

[grid@prim~]$ asmcmd ls -l +DATA/PRIM

RMAN> shutdown immediate;

database dismounted
Oracle instance shut down

RMAN> startup mount;

SQL> show parameter spfile;

RMAN> catalog start with '/backup/';

RMAN> restore database;
4

Section 4

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
RMAN> recover database;

RMAN> alter database open resetlogs;

Statement processed

RMAN> select name, open_mode from v$database;

NAME OPEN_MODE
--------- --------------------
PRIM READ WRITE

RMAN> shutdown immediate;

[oracle@prim~]$ orapwd file='+DATA' dbuniquename='prim' password=oracle

[oracle@prim~]$ srvctl config database -d PRIM

[grid@prim~]$ asmcmd ls -l +DATA/PRIM/PASSWORD
5

Section 5

Code/Command (click line numbers to comment):

1
2
3
4
5
srvctl add database -d prim -o $ORACLE_HOME
srvctl add instance -d prim -i prim1 -n node1
srvctl add instance -d prim -i prim2 -n node2
srvctl config database -d prim -a
srvctl modify database -d prim -spfile +DATA/PRIM/spfileprim.ora

Comments (0)

Please to add comments

No comments yet. Be the first to comment!