概述
用rman备份spfile,删除spfile,然后使其恢复的过程
1)rman备份spfile参数文件
RMAN> backup spfile;
Starting backup at10-MAR-16
allocated channel:ORA_DISK_1
channel ORA_DISK_1:SID=37 device type=DISK
channel ORA_DISK_1:starting full datafile backup set
channel ORA_DISK_1:specifying datafile(s) in backup set
including currentSPFILE in backup set
channel ORA_DISK_1:starting piece 1 at 10-MAR-16
channel ORA_DISK_1:finished piece 1 at 10-MAR-16
piecehandle=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/01r04pd4_1_1tag=TAG20160310T135235 comment=NONE
channel ORA_DISK_1:backup set complete, elapsed time: 00:00:02
Finished backup at10-MAR-16
2)删除spfile和pfile
[oracle@pridbs]$ rm /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorclpri.ora
[oracle@pridbs]$ rm /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorclpri.ora
3)启动数据库,报错,无法找到参数文件,
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: couldnot open parameter file ‘/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorclpri.ora’
4)需要手工建立一个pfile参数文件,然后让数据库启动到nomount状态,rman才可以连接到数据库(pfile是文本模式,可以直接打开编辑;而spfile是二进制文件,无法直接编辑,所以这里编辑了pfile文件)
[oracle@pri dbs]KaTeX parse error: Double subscript at position 476: …/dbs/01r04pd4_1_̲1'; Starting re…ll spfileorclpri.ora
-rw-r----- 1 oracleoinstall 3584 Mar 10 14:02 spfileorclpri.ora
7)重启数据库
SQL> shutdown immediate
ORA-01507: databasenot mounted
ORACLE instanceshut down.
SQL> startup
ORACLE instance started.
Total System GlobalArea 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 490736760 bytes
DatabaseBuffers 335544320 bytes
Redo Buffers 2392064 bytes
Database mounted.
Database opened.
8)现在是以恢复的spfile参数文件启动的
SQL> show parameter spfile;
NAME TYPE VALUE
spfile string /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorclpri.ora
最后
以上就是知性荔枝为你收集整理的用rman备份spfile,删除spfile,然后使其恢复的过程的全部内容,希望文章能够帮你解决用rman备份spfile,删除spfile,然后使其恢复的过程所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复