温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

11g rac增加控制文件

发布时间:2020-08-24 11:26:30 来源:网络 阅读:391 作者:jsj_007 栏目:关系型数据库

当前控制文件

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>


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI