用rman备份spfile,删除spfile,然后使其恢复的过程

用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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值