How to Auto Backup The Control File

文章详细介绍了如何使用RMAN在Oracle数据库中启用和禁用控制文件的自动备份。当执行BACKUP或COPY命令成功,或者数据库结构有变化(如添加或删除表空间、数据文件等)时,RMAN会自动备份控制文件。这个过程由Oracle服务器进程执行。禁用自动备份可以通过RMAN配置参数进行设置。
摘要由CSDN通过智能技术生成

how to enable and disable the auto-backup of the control file in Oracle DB. In case you are not using the Recovery catalog, then enabling the auto backup of Control files of your database is highly recommended.

When does RMAN perform the Auto Backup of The Control files?

 RMAN auto backups the control file and server parameter file when

  1. RMAN has successfully completed the BACKUP or COPY command.
  2. RMAN has successfully completed the CREATE CATALOG command.
  3. When there are any changes to the physical structure of the database. And by changes to the physical structure, I mean Adding or deleting a tablespace or data file, Putting tablespace either online or offline, renaming a data file or adding online redo logs. RMAN will process the auto backup of the control file, even if those changes are made through SQL*Plus.

What Process Performs The Auto-Backup?

What process performs the auto backup of the control file in case of structural changes to the database?

Since everything is taking place in RMAN thus we tend to think and answer “The RMAN process” performs the auto backup. But it’s wrong, actually, Oracle Server Process performs the auto backup of the control file and server parameter file when there is any structural change in the database.

How To Enable Auto Backup of The Control File

Step 1: Start the RMAN and connect with your target database

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Feb 1 15:40:02 2023
Version 19.3.0.0.0

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

connected to target database: CDB1 (DBID=1093429351)

RMAN> 

Step 2: Enable the auto backup of the control file

RMAN> 

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

RMAN> 

 On successful execution of this command, the auto backup of the control file will be enabled.

How To Disable Auto Backup of The Control File.

There are two ways to disable the auto backup of the control file.

Step 1: Start the RMAN and connect with your target database

[oracle@oracle-db-19c ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Feb 1 15:43:08 2023
Version 19.3.0.0.0

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

connected to target database: CDB1 (DBID=1093429351)

RMAN> 

Step 2: Disable the auto backup of the control file

RMAN> 

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP off;

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters are successfully stored

RMAN> 

 On successful execution of this command, the auto backup of the control file will be disabled.

That’s the first way to disable the auto backup of the control file. 

Reset the “CONTROLFILE AUTOBACKUP” parameter.

(another way to disable the auto backup of the control file)

Step 1: Start the RMAN and connect with your target database

[oracle@oracle-db-19c ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Feb 1 15:46:25 2023
Version 19.3.0.0.0

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

connected to target database: CDB1 (DBID=1093429351)

RMAN> 

Step 2: Reset the “CONTROLFILE AUTOBACKUP” parameter.


RMAN> 

RMAN> configure controlfile autobackup clear;

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
RMAN configuration parameters are successfully reset to default value

RMAN> 

On successful execution, this statement will reset the “CONTROLFILE AUTOBACKUP” parameter to its default state.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值