Today in the study of flashback encountered a small problem, unable to enable the flashback function, error: ORA-38706 and ORA-38714
The procedure is as follows:
SQL> archive log list
Database Log mode archive Mode
Automatic Archival Enabled
Archive destination use_recovery_file_dest
Oldest online log sequence 7
Next log sequence to archive 9
Current Log sequence 9
SQL> select log_mode, flashback_on from V $ database;
Log_mode flashback_on
------------------------------
Archivelog No
If archive is not enabled, run the following command in the Mount status:
SQL> alter database archivelog;
Otherwise, flashback cannot be enabled, because archiving is required for flash back.
SQL> select open_mode from V $ database;
Open_mode
----------
Mounted
SQL> alter database flashback on;
Alter database flashback on
*
Error at line 1:
ORA-38706: cannot turn on flashback database logging.
ORA-38714: instance recovery required.
I googled the website and did not find any useful information. This is because archiving is not enabled, but I have enabled archiving.
Check the alert. log file. There is no information, and only one message is reported:
Wed Aug 21 00:15:20 2013
Alter database flashback on
ORA-38706 signalled during: Alter database flashback on...
As prompted, it is understood that you need to recover the database
SQL> recover database;
Media recovery complete.
SQL> alter database flashback on;
Alter database flashback on
*
Error at line 1:
ORA-38706: cannot turn on flashback database logging.
ORA-38714: instance recovery required.
No, so start with the error code number to see what valuable information is available.
[Oracle @ rhel5u3 ~] $ Oerr ora 1, 38706
38706,000 00, "cannot turn on flashback database logging ."
// * Cause: an alter database flashback on command failed.
// Other messages in the Alert Log describe the problem.
// * Action: fix the problem and retry.
This does not mean that there is nothing in alert. log.
[Oracle @ rhel5u3 ~] $ Oerr ora 1, 38714
38714,000 00, "instance recovery required ."
// * Cause: an alter database flashback on command failed
Because
// Database either crashed or was shutdown with the abort
// Option.
// * Action: Open the database and then enter the shutdown command with
// Normal or immediate option.
Wow, the highlights are coming. No, it is clearly written in cause, because the database crash or shutdown abort
Action also describes the solution. It is easy to close the database after open.
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 285212672 bytes
Fixed size 1218992 bytes
Variable Size 67110480 bytes
Database buffers 213909504 bytes
Redo buffers 2973696 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.
Flashback is successfully enabled. Verify the following:
SQL> select log_mode, flashback_on from V $ database;
Log_mode flashback_on
------------------------------
Archivelog Yes
Conclusion: When an error occurs, follow the error prompt to Solve the Problem step by step. First of all, check alert. log to check whether there are valuable prompts. If not, you need to find the problem from the ora-XXXXX error itself. If Google cannot find a good solution, do not be discouraged, we also have the oerr Command provided by Oracle, which is very easy to use. Sometimes using it will surprise you.
Bytes -------------------------------------------------------------------------------------------------------
By mongoon8219 chinaunix blog: http://blog.chinaunix.net/uid/24612962.html
Original content. For more information, see the link. Thank you!
Http://blog.csdn.net/aaron8219/article/details/10129503