11g rac增加控制文件
当前控制文件
SQL> select inst_id,name from gv$controlfile;
INST_ID NAME
---------- -------------------------------------------------------
2 +DG1/prodb/controlfile/current.276.998921677
1 +DG1/prodb/controlfile/current.276.998921677
备份参数文件
SQL> create pfile='/home/oracle/prodb.pfile' from spfile;
修改参数文件
SQL> alter system set control_files='+DG1/prodb/controlfile/current.276.998921677','+FRG' scope=spfile sid='*';
关闭数据库
[oracle@prodb1 ~]$ srvctl stop database -d racdb -o immediate
检查状态
[oracle@prodb1 ~]$ srvctl status database -d prodb ;
恢复控制文件
[oracle@prodb1 ~]$ rman target /
RMAN> startup nomount;
RMAN> restore controlfile from '+DG1/prodb/controlfile/current.276.998921677';
Starting restore at 30-JAN-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=prodb1 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DG1/prodb/controlfile/current.276.998921677
output file name=+FRG/prodb/controlfile/current.334.998923047
RMAN> exit;
重启数据库
[oracle@prodb1 ~]$ srvctl stop database -d prodb -o immediate;
[oracle@prodb1 ~]$ srvctl start database -d prodb
验证
SQL> select inst_id,name from gv$controlfile;
INST_ID NAME
---------- -------------------------------------------------------
2 +DG1/prodb/controlfile/current.276.998921677
2 +FRG/prodb/controlfile/current.334.998923047
1 +DG1/prodb/controlfile/current.276.998921677
1 +FRG/prodb/controlfile/current.334.998923047
SQL> show parameter controlfile
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DG1/prodb/controlfile/current
.276.998921677, +FRG/prodb/con
trolfile/current.334.998923047
control_management_pack_access string DIAGNOSTIC+TUNING
SQL>
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341