0
点赞
收藏
分享

微信扫一扫

添加控制文件—场景(磁盘组+RAC)

数据库:19.3.0.0

系统:CentOS 7.9

节点1:

SQL> show parameter control

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

control_file_record_keep_time             integer     7

control_files                                        string      +DATA/ORCL/CONTROLFILE/current

                                                                         .261.1099351569

control_management_pack_access       string      DIAGNOSTIC+TUNING

SQL> alter system set control_files='+DATA/ORCL/CONTROLFILE/current.261.1099351569','+OCR/ORCL/CONTROLFILE/control01.ctl' scope=spfile;

System altered.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area 3640654064 bytes

Fixed Size                  8902896 bytes

Variable Size             771751936 bytes

Database Buffers         2852126720 bytes

Redo Buffers                7872512 bytes

SQL> show parameter control

NAME                                 TYPE                              VALUE

------------------------------------ --------------------------------- ------------------------------

control_file_record_keep_time        integer                           7

control_files                                  string                            +DATA/ORCL/CONTROLFILE/current

                                                                                         .261.1099351569, +OCR/ORCL/CON

                                                                                         TROLFILE/control01.ctl

control_management_pack_access       string                      DIAGNOSTIC+TUNING

此时关闭节点2数据库,节点1再执行:

[oracle@hisdb1:/home/oracle]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Tue Mar 15 22:24:35 2022

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (not mounted)

RMAN> restore controlfile from '+DATA/ORCL/CONTROLFILE/current.261.1099351569';

Starting restore at 15-MAR-22

using channel ORA_DISK_1

channel ORA_DISK_1: copied control file copy

output file name=+DATA/ORCL/CONTROLFILE/current.261.1099351569

output file name=+OCR/ORCL/CONTROLFILE/control01.ctl

Finished restore at 15-MAR-22

RMAN> alter database mount;

released channel: ORA_DISK_1

Statement processed

RMAN> alter database open;

Statement processed

RMAN> select name from v$controlfile;

NAME                                                                            

--------------------------------------------------------------------------------

+DATA/ORCL/CONTROLFILE/current.261.1099351569

+OCR/ORCL/CONTROLFILE/control01.ctl

举报

相关推荐

0 条评论