RMAN Recovery Case - Lost SPFILE recovery

xiaoxiao2021-03-06  71

1.1. Lost SPFILE recovery

Big premise: Automatic backup of the database control file has been configured, and there is a reliable backup:

Rman> Configure ControlFile Autobackup ON;

New RMAN configuration parameters:

Configure controlfile automack.

Successfully stored new RMAN configuration parameters

Rosync that is starting all restored directories

Complete all RESYNC

Rman>

Rman> Configure ControlFile Autoback Format for Device Type Disk to 'D: / RMANTEST /% F';

New RMAN configuration parameters:

Configure ControlFile Autobackup Format for Device Type Disk to 'D: / RMANTEST /% F';

Successfully stored new RMAN configuration parameters

Rosync that is starting all restored directories

Complete all RESYNC

Rman>

Rman> show all;

RMAN configuration parameters are:

Configure rettention policy to redundancy 1; # Default

Configure backup Optimization OFF; # default

CONFIGURE DEFAULT Device Type to Disk

Configure controlfile automack.

Configure ControlFile Autobackup Format for Device Type Disk to 'D: / RMANTEST /% F';

Configure Device Type Disk Parallelism 1;

Configure DataFile Backup Copies for Device Type Disk to 1; # Default

Configure archivelog backup copies for device type disk to 1; # default

Configure maxsetsize to unlimited; # default

Configure snapshot controlfile name to 'd: /oracle92/database/sncftest1.ora'; # default

Rman>

Rman> Run {

2> Backup Database

3> tag 'full_db_20041007'

4> Format 'D: /RMANTEST/FULL_DBTEST_YYYYMMDD%_U%.bak'

5> Include Current ControlFile;

6> Backup ArchiveLog All

7> Tag 'Arch_bak'

8> Format 'D: /RMANTEST/Arch_yyyyymmdd%_U%.bak'

Delete Input;}

Launch backup in 2007- October -04

Assigned channel: ORA_DISK_1

Channel ORA_DISK_1: SID = 13 DevType = Disk

Channel ORA_DISK_1: Start Full Data File Backup Set

Channel ORA_DISK_1: Data file being specified in the backup set

Backup Concentration includes current control files

Enter data file fno = 00001 Name = d: /oracle92/test1/system01.dbf

Enter data file fno = 00002 Name = d: /oracle92/test1/undotbs01.dbf

Enter data file fno = 00006 Name = d: /oracle92/test1/rman01.dbf

Enter data file fno = 00003 Name = d: /oracle92/test1/indx01.dbf

Enter data file fno = 00005 name = d: /oracle92/test1/users01.dbf

Enter data file fno = 00004 name = d: /oracle92/test1/tools01.dbf

Channel ORA_DISK_1: Start Segment 1 in 2007- October -04

Channel ORA_DISK_1: Completed Segment 1 in 2007- October -04

Segment Handle = D: /RMANTEST/FULL_DBTEST_YYYYYMMDD%_U%.bak comment = none

Channel ORA_DISK_1: Backup Set has been completed, after time: 00: 01: 06

Complete Backup in 2007- October -04

Launch backup in 2007- October -04

Current log already archive

Use channel ORA_DISK_1

Channel ORA_DISK_1: Start the archive log backup set

Channel ORA_DISK_1: Archive Log for Specify Backup Concentration

Enter archive log thread = 1 sequence = 15 record ID = 20 time stamp = 538928248

Channel ORA_DISK_1: Start Segment 1 in 2007- October -04

Channel ORA_DISK_1: Completed Segment 1 in 2007- October -04

Segment Handle = D: /RMANTEST/Arch_YYYYMMDD%_U%.bak Comment = None

Channel ORA_DISK_1: The backup set has been completed, after the time: 00: 00: 02

Channel ORA_DISK_1: Remove Archive Log

Archive log file name = d: /oracle92/admin/test1/Arch/arc00015.001 record id = 20 timestamp = 538928248

Complete Backup in 2007- October -04

Starting Control File and SPFile Autobackup in 2007- October -04

Segment Handle = D: / RMANTEST / C-91059946-20041007-00 Comment = None

Complete Control File and SPFile Autobackup in 2007- October -04

Rman>

1.1.1. Move the current SPFILE to other locations to simulate SPFILE Loss

Rman> Host;

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

C: /> Move D: /oracle92/database/spfiletest1.ora d: /oracle92/database/bak/spfileest1.ora

C: /> DIR D: /ORACLE92/Database/spfiletest1.ora

The volume in the driver D has no label.

The serial number of the volume is 644D-03D9

D: / Oracle92 / Database directory

Can't find a document

C: /> DIR D: /Oracle92/Database/bak/spfileest1.ora

The volume in the driver D has no label.

The serial number of the volume is 644D-03D9

D: / Oracle92 / Database / Bak directory

2004-10-04 14:06 2,560 spfiletest1.ora

1 file 2,560 bytes

0 catalogs 10, 708, 807, 680 available bytes

C: /> EXIT

Host command is completed

Rman>

1.1.2. Set Oracle_SID

C: /> set oracle_sid = TEST1

C: /> echo oracle_sidoracle_sid

C: />

1.1.3. Login RMAN

C: /> rman

Recovery Manager: Version

9.2.0

.1.0 - Production

CopyRight (C) 1995, 2002, Oracle Corporation. All Rights Reserved.

Rman> Connect Target Lunar / Lunar @ Test1

Target database (not started)

Rman> Connect Catalog RMAN / RMAN @ rman

Connect to the recovery directory database

Rman>

1.1.4. Set DBID in RMAN

Make RMAN to know which database needs to find SPFile

(The DBID must be set in the case of data closing)

Rman> set dbid = 910599446

Is executing a command: set dbid

Rman>

1.1.5. Start the database to the Nomount state

Rman> Startup Nomount;

Startup failure: ORA-01078: Failure In Processing System Parameters

LRM-00109: N ^ 7 (4R? * 2nj} nd <~ 'd: /oacle92/database/inittest1.ora'

Try starting Oracle routines without parameter files ...

Oracle routines have been started

System Global Region Total 97589952 bytes

Fixed size 453312 bytes

Variable size 46137344 bytes

Database buffers 50331648 bytes

Redo buffers 667648 bytes

Rman>

1.1.6. Restore parameter files from automatic backup

Rman> show all;

RMAN configuration parameters are:

Configure rettention policy to redundancy 1; # Default

Configure backup Optimization OFF; # default

CONFIGURE DEFAULT Device Type to Disk

Configure controlfile automack.

Configure ControlFile Autobackup Format for Device Type Disk to 'D: / RMANTEST /% F';

Configure Device Type Disk Parallelism 1;

Configure DataFile Backup Copies for Device Type Disk to 1; # Default

Configure archivelog backup copies for device type disk to 1; # default

Configure maxsetsize to unlimited; # default

Rman> Restore SPFile from Autobackup;

Start Restore in 2007- October -04

Assigned channel: ORA_DISK_1

Channel ORA_DISK_1: SID = 9 DevType = Disk

Channel ORA_DISK_1: Look for automatic backup below: 20041007

Channel ORA_DISK_1: Auto Backups I have found: D: / RMANTEST / C-910599446-20041007-00

Channel ORA_DISK_1: Restore SPFile from Auto Backup

Complete Restore in 2007- October -04

RMAN> Host; Recovery Manager is done.

C: /> DIR D: /ORACLE92/Database/spfiletest1.ora

The volume in the driver D has no label.

The serial number of the volume is 644D-03D9

D: / Oracle92 / Database directory

2004-10-07 14:31 2,560 spfiletest1.ora

1 file 2,560 bytes

0 catalog 10, 528, 374, 784 can be used bytes

C: /> EXIT

Recovery Manager: Version

9.2.0

.1.0 - Production

CopyRight (C) 1995, 2002, Oracle Corporation. All Rights Reserved.

Connect to the target database: TEST1 (not installed)

Connect to the recovery directory database

Rman>

1.1.7. Close the database with shutdown immediate

Rman> shutdown immediate;

Oracle routines have been closed

Rman>

1.1.8. Restart the database

Rman> set dbid = 910599446

Is executing a command: set dbid

Rman> Startup

Target database (not started)

Oracle routines have been started

Database has been loaded

Database has been opened

System Global Region Total 101784276 bytes

Fixed size 453332 bytes

Variable size 75497472 bytes

Database buffers 25165824 bytes

Redo buffers 667648 bytes

Rman>

转载请注明原文地址:https://www.9cbs.com/read-109521.html

New Post(0)