千家信息网

11g rac增加控制文件

发表于:2025-01-20 作者:千家信息网编辑
千家信息网最后更新 2025年01月20日,当前控制文件SQL> select inst_id,name from gv$controlfile;INST_ID NAME---------- --------------------------
千家信息网最后更新 2025年01月20日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>


0