Enable the database flashback Function

Source: Internet
Author: User

Enable the Database flash back function-to close the Database, you need to open the Database to the mount State to enable the flash back function: SQL> shutdown immediate Database closed. database dismounted. ORACLE instance shut down. SQL> show user USER is "SYS" SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production With the Partitioning, OLAP and Data Mining options [lubinsu @ localhost oracle] $ sqlplus sys/lubinsu as sysdba SQL * Plus: Release 10.2.0.1.0-Production on Sat Mar 23 20:14:38 2013 Copyright (c) 1982,200 5, oracle. all rights reserved. connected to an idle instance. SQL> show parameter database ORA-01034: ORACLE not available SQL> startup nomout SP2-0714: invalid combination of STARTUP options SQL> startup nomount ORACLE instance started. total System Global Area 285212672 bytes Fixed Size 1218968 bytes Variable Size 88082024 bytes Database Buffers 188743680 bytes Redo Buffers 7168000 bytes SQL> alter database flashback on 2; alter database flashback on * ERROR at line 1: ORA-01507: database not mounted SQL> alter database mount 2; Database altered. SQL> alter database flashback on 2; alter database flashback on * ERROR at line 1: ORA-38706: Cannot turn on FLASHBACK DATABASE logging. ORA-38707: Media recovery is not enabled. -- You need to enable archiving to use the flash back function SQL> alter database archivelog on 2; alter database archivelog on * ERROR at line 1: ORA-00933: SQL command not properly ended SQL> alter database archivelog; database altered. SQL> alter database flashback on; Database altered. SQL> alter database open; Database altered. -- view the earliest scn number that can be flashed back -- if the returned record is empty, the flashback function SQL is not enabled> select oldest_flashback_scn from v $ flashback_database_log; OLDEST_FLASHBACK_SCN ------------------ 1.20.1e + 13 SQL> select flashback from v $ database; select flashback from v $ database * ERROR at line 1: ORA-00904: "FLASHBACK ": invalid identifier -- you can also check whether the flash back function has been enabled: SQL> select flashback_on from v $ database; FLASHBACK_ON -------------- YES

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.