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

Issue

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

Background

         数据库的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

Process

Backup script:

#!/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;

Recover

数据库操作一段时间后,进行恢复,将备份后的文件restore到相应的目录下,打开数据库,出现错误。

SQL> startup  

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.

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

 

Alter 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"

Cause

[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 ~]$

 [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 ~]$

[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.

 

Solution

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.

 

你可能感兴趣的:(ORA-38760: This database instance failed to turn on flashback database)