Backing Up the Control File

Backing Up the Control File

The control file is critical for recovery, as it contains crucial information like database checkpoints and the datafile header checkpoints for the datafiles. A recovery is much harder when you lose all copies of your control file. You also need to create a new control file when you want to change the name of a database, clone a database in a different location, or increase the maximum number of files you specified when you first created the control file.

You've seen how you can back up a control file using RMAN's BACKUP CONTROLFILE command. That command will produce a binary copy of the control file. You can also use the SQL statement ALTER DATABASE BACKUP CONTROLFILE from the SQL*Plus interface or from within RMAN to back up your control files.

It's a good practice to back up your control file on a regular basis by using the BACKUP CONTROLFILE TO TRACE command, as shown here:

SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
Database altered.
SQL>

You can use the ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS 'filename' command to achieve the same result as the preceding command. It will produce a text file that has the CREATE CONTROLFILE statement in it.

You should immediately back up your control file after you perform any of the following operations:

  • Create or drop a tablespace.

  • Add or rename a datafile.

  • Add, rename, or drop an online redo log group or member.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值