The new 10g ASM production database is coming soon. The following is a simple Backup recovery test before the release:
1. perform backup first
$ Rman target/@ full_bak. SQL
Recovery Manager: Release 10.1.0.3.0-64bit Production
Copyright (c) 1995,200 4, Oracle. All rights reserved.
Connected to target database: MMSDB (DBID = 799462343)
RMAN> run {
2> backup database plus archivelog delete all input;
3> delete obsolete;
4>}
5>
Starting backup at 13-APR-05
Current log archived
Using target database controlfile instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 162 devtype = DISK
Channel ORA_DISK_1: starting archive log backupset
Channel ORA_DISK_1: specifying archive log (s) in backup set
Input archive log thread = 1 sequence = 28 recid = 2 stamp = 555502358
Channel ORA_DISK_1: starting piece 1 at 13-APR-05
Channel ORA_DISK_1: finished piece 1 at 13-APR-05
Piece handle =/msflsh/MMSDB/backupset/2005_04_13/o1_mf_annnn_TAG20050413T101239_15s00ry0 _. bkp
Comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Channel ORA_DISK_1: deleting archive log (s)
Archive log filename =/msflsh/MMSDB/archivelog/2005_04_13/o1_mf_1_28_15s00pg2 _. arc recid = 2
Stamp = 555502358
Finished backup at 13-APR-05
Starting backup at 13-APR-05
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting full datafile backupset
Channel ORA_DISK_1: specifying datafile (s) in backupset
Input datafile fno = 00001 name = + DATADG/mmsdb/datafile/system.259.3
Input datafile fno = 00003 name = + DATADG/mmsdb/datafile/sysaux.257.3
Input datafile fno = 00002 name = + DATADG/mmsdb/datafile/undotbs1.258.3
Input datafile fno = 00004 name = + DATADG/mmsdb/datafile/users.256.3
Channel ORA_DISK_1: starting piece 1 at 13-APR-05
Channel ORA_DISK_1: finished piece 1 at 13-APR-05
Piece handle =/msflsh/MMSDB/backupset/2005_04_13/o1_mf_nnndf_TAG20050413T101242_15s00thq _. bkp
Comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 13-APR-05
Starting backup at 13-APR-05
Current log archived
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting archive log backupset
Channel ORA_DISK_1: specifying archive log (s) in backup set
Input archive log thread = 1 sequence = 29 recid = 3 stamp = 555502377
Channel ORA_DISK_1: starting piece 1 at 13-APR-05
Channel ORA_DISK_1: finished piece 1 at 13-APR-05
Piece handle =/msflsh/MMSDB/backupset/2005_04_13/o1_mf_annnn_TAG20050413T101257_15s01bwm _. bkp
Comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Channel ORA_DISK_1: deleting archive log (s)
Archive log filename =/msflsh/MMSDB/archivelog/2005_04_13/o1_mf_1_29_15s019mj _. arc recid = 3
Stamp = 555502377
Finished backup at 13-APR-05
Starting Control File and SPFILE Autobackup at 13-APR-05
Piece handle =/msflsh/MMSDB/autobackup/2005_04_13/o1_mf_s_555502380_15s01df2 _. bkp
Comment = NONE
Finished Control File and SPFILE Autobackup at 13-APR-05
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Using channel ORA_DISK_1
No obsolete backups found
Recovery Manager complete.
2. Freeze the HA and stop the database for restoration.
$ Id
Uid = 101 (oracle) gid = 101 (dba)
$ Exit
# Id
Uid = 0 (root) gid = 1 (other)
# Hagrp-freeze MMSDB-persistent
# Su-oracle
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
You have new mail.
$ Id
Uid = 101 (oracle) gid = 101 (dba)
$ Sqlplus "/as sysdba"
SQL * Plus: Release 10.1.0.3.0-Production on Wed Apr 13 10:19:28 2005
Copyright (c) 1982,200 4, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0-64bit Production
With the Partitioning and Data Mining options
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0-64bit Production
With the Partitioning and Data Mining options
3. Execute recovery
$ Rman target/
Recovery Manager: Release 10.1.0.3.0-64bit Production
Copyright (c) 1995,200 4, Oracle. All rights reserved.
Connected to target database (not started)
RMAN> startup mount;
Oracle instance started
Database mounted
Total System Global Area 3204448256 bytes
Fixed Size 1304912 bytes
Variable Size 651957936 bytes
Database Buffers 2550136832 bytes
Redo Buffers 1048576 bytes
RMAN> restore database;
Starting restore at 13-APR-05
Using target database controlfile instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 160 devtype = DISK
Channel ORA_DISK_1: starting datafile backupset restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Restoring datafile 00001 to + DATADG/mmsdb/datafile/system.259.3
Restoring datafile 00002 to + DATADG/mmsdb/datafile/undotbs1.258.3
Restoring datafile 00003 to + DATADG/mmsdb/datafile/sysaux.257.3
Restoring datafile 00004 to + DATADG/mmsdb/datafile/users.256.3
Channel ORA_DISK_1: restored backup piece 1
Piece handle =/msflsh/MMSDB/backupset/2005_04_13/o1_mf_nnndf_TAG20050413T101242_15s00thq _. bkp
Tag = TAG20050413T101242
Channel ORA_DISK_1: restore complete
Finished restore at 13-APR-05
RMAN> recover database;
Starting recover at 13-APR-05
Using channel ORA_DISK_1
Starting media recovery
Media recovery complete
Finished recover at 13-APR-05
RMAN> alter database open;
Database opened
RMAN>
4. Do not forget to unfreeze the HA
$ Exit
# Id
Uid = 0 (root) gid = 1 (other)
# Hagrp-unfreeze MMSDB-persistent
The testing process is for reference only.