OCP043 lecture 6 Flashback

Source: Internet
Author: User

Flash back is the biggest new feature of oracle10g. Most of the flash back content has been sorted out before, including flash back database, flash back Delete table, delete table, and Flash back version query, this topic describes how to ensure the query of data dictionaries and dynamic performance views related to flashback and flashback.
I. Create a flashback protection point
[Oracle @ rhel6 ~] $ Export ORACLE_SID = winorcl
[Oracle @ rhel6 ~] $ Sqlplus/nolog
SQL * Plus: Release 10.2.0.1.0-Production on Mon Jul 18 14:35:36 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
 
SQL> conn/as sysdba
Connected
 
SQL> select flashback_on, name, log_mode from v $ database;
 
FLASHBACK _ NAME LOG_MODE
---------------------------------------------------
NO WINORCL ARCHIVELOG
 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
 
Total System Global Area 268435456 bytes
Fixed Size 2020056 bytes
Variable Size 130026792 bytes
Database Buffers 130023424 bytes
Redo Buffers 6365184 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.
 
SQL> alter database open;
Database altered
 
[Oracle @ rhel6 ~] $ Ps-ef | grep rvwr
Oracle 25280 1 0? 00:00:00 ora_rvwr_winorcl
Oracle 25359 25332 0 00:00:00 pts/2 grep rvwr
 
SQL> create restore point important_change guarantee flashback database;
Restore point created.
 
SQL> show parameter flash;

NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_flashback_retention_target integer 4320
 
 
SQL> select scn, name, time, guarantee_flashback_database as gfb from v $ restore_point;
 
SCN NAME TIME GFB
-------------------------------------------------
731367 IMPORTANT _ 18-JUL-11 02.43.28.0 YES
CHANGE 00000000 PM
Ii. View related dynamic performance views
SQL> SELECT estimated_flashback_size,
2 flashback_size
3 * from v $ FLASHBACK_DATABASE_LOG;
 
ESTIMATED_FLASHBACK_SIZE FLASHBACK_SIZE
--------------------------------------
117645312 8192000
 
 
SQL> SELECT oldest_flashback_scn,
2 oldest_flashback_time
3 * from v $ FLASHBACK_DATABASE_LOG;
 
 
OLDEST_FLASHBACK_SCN OLDEST_FLASHBACK_TI
---------------------------------------
731198 2011-07-18-14:38:56
This article is from the "yueda tianchong" blog

Related Article

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.