backup spfile;
list backup of spfile;
spfile丢失如何处理?
export ORACLE_SID=a
rman target /
startup nomount
restore spfile from '.....s......';
shutdown abort
mv .... ......
RMAN> list backup of spfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time
Completion Time
------- ---- -- ---------- ----------- ------------
---------------
14 Full
80.00K DISK 00:00:00 11-APR-14
BP Key: 14 Status: AVAILABLE
Compressed: NO Tag:
TAG20140411T164205
Piece Name:
/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_11/o1_mf_nnsnf_TAG20140411T164205_9nhbpxmz_.bkp
SPFILE Included: Modification time:
11-APR-14
RMAN>
[oracle@localhost ~]$ rm
/u01/app/oracle/product/10gR2.1/dbs/spfileorcl.ora
[oracle@localhost ~]$ sqlplus -s
/ as sysdba
alter system set log_archive_format='%t_%s_%r.arc'
scope=spfile;
alter system set log_archive_format='%t_%s_%r.arc'
scope=spfile
*
ERROR at line 1:
ORA-01565: error in identifying file
'/u01/app/oracle/product/10gR2.1/dbs/spfileorcl.ora'
ORA-27037: unable to obtain file status
Linux-x86_64
Error: 2: No such file or directory
Additional information: 3
exit
[oracle@localhost ~]$
[oracle@localhost ~]$ ps -ef|grep ora_|cut -d '_'
-f3|uniq
updb
orcl
[oracle@localhost ~]$ export
ORACLE_SID=a
[oracle@localhost ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Apr
11 16:44:47 2014
Copyright (c) 1982, 2005, Oracle.
All rights reserved.
connected to target database (not started)
RMAN> startup nomount
startup failed:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
'/u01/app/oracle/product/10gR2.1/dbs/inita.ora'
starting Oracle instance without parameter file for retrival
of spfile
Oracle
instance started
Total System Global Area 159383552 bytes
Fixed Size 2019224 bytes
Variable Size 67108968
bytes
Database Buffers 83886080 bytes
Redo Buffers 6369280 bytes
RMAN> restore spfile from
'/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_11/o1_mf_nnsnf_TAG20140411T164205_9nhbpxmz_.bkp';
Starting restore at 11-APR-14
using target database control file instead of recovery
catalog
allocated channel:
ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK
channel
ORA_DISK_1: autobackup found:
/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_11/o1_mf_nnsnf_TAG20140411T164205_9nhbpxmz_.bkp
channel
ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 11-APR-14
RMAN> shutdown abort
Oracle instance
shut down
RMAN> exit
Recovery Manager complete.
[oracle@localhost ~]$ mv
/u01/app/oracle/product/10gR2.1/dbs/spfile{a,orcl}.ora
[oracle@localhost ~]$ export
ORACLE_SID=orcl
[oracle@localhost ~]$ sqlplus -s
/ as sysdba
alter system set log_archive_format='%r_%s_%t.arc'
scope=spfile;
System altered.
exit
[oracle@localhost ~]$