189 8069 5689

11grac增加控制文件

当前控制文件

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>


创新互联是一家专业提供武义企业网站建设,专注与成都做网站、成都网站建设、HTML5、小程序制作等业务。10年已为武义众多企业、政府机构等服务。创新互联专业的建站公司优惠进行中。


本文题目:11grac增加控制文件
转载注明:http://cdxtjz.cn/article/jisepo.html

其他资讯