How can Restore SPFILE (on Windows)


C:\Documents and Settings\oracle>rman target /
Recovery Manager: Release 11.2.0.1.0 – Production on Sat Feb 18 00:02:33 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: PROD (DBID=183876134)
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
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 ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128′; # default
CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘C:\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFPROD.ORA’; # default
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
RMAN>
RMAN> backup database plus archivelog ;
Starting backup at 18-FEB-15
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\ORACLE\ORADATA\PROD\SYSTEM01.DBF
…
…
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:03
Finished backup at 18-FEB-15
Starting backup at 18-FEB-15
current log archived
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=276 RECID=46 STAMP=775527973
channel ORA_DISK_1: starting piece 1 at 18-FEB-15
channel ORA_DISK_1: finished piece 1 at 18-FEB-15
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\PROD\BACKUPSET\2015_02_18\O1_MF_ANNNN
_TAG20150218T002613_7MXO05P9_.BKP tag=TAG20150218T002613 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-FEB-15
Starting Control File and SPFILE Autobackup at 18-FEB-15
piece handle=E:\ORACLE\RMAN_BACKUP\C-183876134-20150218-00 comment=NONE
Finished Control File and SPFILE Autobackup at 18-FEB-15
RMAN>
Then We can drop spfile nad start database again
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
RMAN> startup
connected to target database (not started)
startup failed:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘C:\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\INITPROD.ORA’
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 02/18/2015 00:32:47
ORA-00205: error in identifying control file, check alert log for more info
RMAN>
Solution:
RMAN> restore spfile from autobackup ;
Starting restore at 19-FEB-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=47 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=5 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=48 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=92 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=136 device type=DISK
allocated channel: ORA_DISK_6
channel ORA_DISK_6: SID=6 device type=DISK
allocated channel: ORA_DISK_7
channel ORA_DISK_7: SID=49 device type=DISK
allocated channel: ORA_DISK_8
channel ORA_DISK_8: SID=93 device type=DISK
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_1: AUTOBACKUP found: c-183876134-20150219-04
channel ORA_DISK_2: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_2: skipped, AUTOBACKUP already found
channel ORA_DISK_3: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_3: skipped, AUTOBACKUP already found
channel ORA_DISK_4: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_4: skipped, AUTOBACKUP already found
channel ORA_DISK_5: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_5: skipped, AUTOBACKUP already found
channel ORA_DISK_6: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_6: skipped, AUTOBACKUP already found
channel ORA_DISK_7: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_7: skipped, AUTOBACKUP already found
channel ORA_DISK_8: looking for AUTOBACKUP on day: 20150219
channel ORA_DISK_8: skipped, AUTOBACKUP already found
channel ORA_DISK_1: restoring spfile from AUTOBACKUP c-183876134-20150219-04
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 19-FEB-15
RMAN>
RMAN> shutdown immediate ;
Oracle instance shut down
RMAN> startup
connected to target database (not started)
Oracle instance started
database mounted
database opened
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 335544784 bytes
Database Buffers 192937984 bytes
Redo Buffers 5804032 bytes
RMAN>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: