OORA-38760: This database instance failed to turn on flashback database

问题

ORA-38760: Thisdatabase instance failed to turn on flashback database

背景

数据库的Flashback是打开的,测试冷备和恢复。
SQL> select * from v$version;
BANNER
-------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE       11.2.0.3.0        Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES

测试过程

## 备份脚本: ##
#!/bin/bash
sqlplus / as sysdba <<EOF
shutdown immediate;
ho cp /u01/app/oracle/oradata/orcl/control01.ctl /rmp/backup/controlfile/contril01.ctl
ho cp /u01/app/oracle/fast_recovery_area/orcl/control02.ctl /rmp/backup/controlfile/control02.ctl
ho cp /u01/app/oracle/oradata/orcl/*.dbf /rmp/backup/datafile/
ho cp /u01/app/oracle/oradata/orcl/*.log /rmp/backup/logfile/
startup;
exit;
EOF;
## 恢复: ##
将备份后的文件restore到相应的目录下,打开数据库,出现错误。

错误信息

## alert.log ##
Allocated 15937344 bytes in shared pool for flashback generation buffer
Starting background process RVWR
Tue Jan 05 15:56:45 2016
RVWR started with pid=20, OS id=6507
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_rvwr_6507.trc:
ORA-38739: Flashback log file is more recent than control file.
ORA-38701: Flashback database log 2 seq 2 thread 1: "/u01/app/oracle/fast_recovery_area/ORCL/flashback/o1_mf_c8mwpz5j_.flb"
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount
Tue Jan 05 15:56:52 2016
alter database open
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_6472.trc:
ORA-38760: This database instance failed to turn on flashback database
ORA-38760 signalled during: alter database open...
## trace log ##
Trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_rvwr_6507.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name:    orcl01
Release:  2.6.32-358.el6.x86_64
Version:   #1 SMP Fri Feb 22 00:31:26 UTC 2013
Machine: x86_64
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 20
Unix process pid: 6507, image: oracle@orcl01 (RVWR)
*** 2016-01-05 15:56:45.248
*** SESSION ID:(5.3) 2016-01-05 15:56:45.248
*** CLIENT ID:() 2016-01-05 15:56:45.248
*** SERVICE NAME:() 2016-01-05 15:56:45.248
*** MODULE NAME:() 2016-01-05 15:56:45.248
*** ACTION NAME:() 2016-01-05 15:56:45.248
ORA-38739: Flashback log file is more recent than control file.
ORA-38701: Flashback database log 2 seq 2 thread 1: "/u01/app/oracle/fast_recovery_area/ORCL/flashback/o1_mf_c8mwpz5j_.flb"

原因

[oracle@orcl01 ~]$ oerr ora 38760
38760, 00000, "This database instance failed to turn on flashback database"
// *Cause: Database flashback is on but this instance failed to
//         start generating flashback data. Look in alert log for more
//         specific errors.
// *Action: Correct the error or turn off database flashback.
 [oracle@orcl01 ~]$ oerr ora 38739
38739, 00000, "Flashback log file is more recent than control file."
// *Cause: The control file change sequence number in the flashback
//         database log file was greater than the number in the
//         control file. This implies that the wrong control file
//         was being used. Note that repeatedly causing this error
//         can make it stop happening without correcting the real
//         problem. Every attempt to open the database will advance the
//         control file change sequence number until it is great enough.
// *Action: FLASHBACK DATABASE can only be used with the current
//          control file.  If it is not available, then a restore
//          and an incomplete recovery must be performed instead.
[oracle@orcl01 ~]$ oerr ora 38701
38701, 00000, "Flashback database log %s seq %s thread %s: \"%s\""
// *Cause: This message reports the filename for details of another message.
// *Action: Other messages will accompany this message.  See the associated
//          messages for the appropriate action to take.

解决办法

SQL> alter database flashback off;
Database altered.
SQL> alter database open;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size                      2228784 bytes
Variable Size              973082064 bytes
Database Buffers      620756992 bytes
Redo Buffers               7344128 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.
SQL> alter database open;
Database altered.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值