1.启用控制文件自动备份 [oracle@standby oracle]$ rman target / Recovery Manager: Release 9.2.0.4.0 - Production Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved. connected to target database: PRIMARY (DBID=1367687269) --注意记录这里的DBID,在此后的恢复中,你可能需要用到。 RMAN> configure controlfile autobackup on; using target database controlfile instead of recovery catalog new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored RMAN> exit Recovery Manager complete. 在启用了自动备份以后,在数据库发生文件变化或备份等任务时,数据库会自动备份控制文件。 如果丢失了所有的控制文件及数据文件,我们可以尝试从自动备份中恢复控制文件及spfile文件。 2.丢失所有所有的控制文件的恢复尝试 [oracle@standby oradata]$ rman target / Recovery Manager: Release 9.2.0.4.0 - Production Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved. connected to target database (not started) 首先启动数据库到nomount状态 RMAN> startup nomount; Oracle instance started Total System Global Area 135337420 bytes Fixed Size 452044 bytes Variable Size 109051904 bytes Database Buffers 25165824 bytes Redo Buffers 667648 bytes 尝试从自动备份中恢复控制文件 RMAN> restore controlfile to '/opt/oracle/oradata/control01.ctl' from autobackup; Starting restore at 09-MAR-05 using target database controlfile instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=11 devtype=DISK RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 03/09/2005 10:15:05 RMAN-06495: must explicitly specify DBID with SET DBID command 此时提示,必须显示的指定DBID,Oracle才能正确定位备份文件。 RMAN> set DBID=1367687269 executing command: SET DBID RMAN> restore controlfile to '/opt/oracle/oradata/control01.ctl' from autobackup; Starting restore at 09-MAR-05 using channel ORA_DISK_1 channel ORA_DISK_1: looking for autobackup on day: 20050309 channel ORA_DISK_1: autobackup found: c-1367687269-20050309-00 channel ORA_DISK_1: controlfile restore from autobackup complete Finished restore at 09-MAR-05 指定DBID之后,控制文件可以恢复
oracle9i自动备份工具,使用Oracle9i的自动控制文件备份功能
最新推荐文章于 2024-06-11 15:10:16 发布