oracle 11 g标准版
正确闪回执行方式:
SQL> shutdown; SQL> startup mount; 数据库启动到mount下
SQL> alter table SY_GLOBAL_NAME enable row movement; --意思是允许Oracle修改rowid。Oracle插入数据时会为该条数据分配唯一rowid并且不变,要启用闪回功能必须开启可修改rowid功能 SQL> SQL> flashback table SY_GLOBAL_NAME TO TIMESTAMP TO_TIMESTAMP('2013-05-04 03:16
:00','yyyy-MM-dd hh24:MI:ss'); --真正地闪回操作
删除某个表的数据后闪回表的操作
alter table SY_MENU_PARAM enable row movement;
flashback table SY_MENU_PARAM TO timestamp to_timestamp('2013-03-28 11:30
一 删除表之后的闪回操作
KEY POINT:
1 使用除了sys之外的其他用户
2 不能使用默认的sys表空间
步骤
1
2 create a new table and insert one record then delete it.
Use the flashback table tabsys to before drop;
to do the data reduction:(If there is some data in the table .the aboving command also could help to reduct those data)
SQL> create table tabsys (f1 int) tablespace circoweb; Tabla creada. SQL> insert into tabsys values (123); 1 fila creada. SQL> select tablespace_name from dba_segments where segment_name='TABSYS'; TABLESPACE_NAME CIRCOWEB SQL> drop table tabsys; Tabla borrada. SQL> flashback table tabsys to before drop; Flashback terminado. SQL> select * from tabsys; F1 123
二 数据库表数据的闪回操作
结论:Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product 不支持单个数据库表的闪回
查证1 :
SQL> SELECT * FROM V$OPTION ORDER BY VALUE;
PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
Flashback Table
FALSE
查证2
SQL> alter database flashback off;
Database altered.
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-00439: feature not enabled: Flashback Database
-- 不支持闪回
三 其他
设置数据库闪回的时间(默认为15分钟 修改该参数)
alter system set undo_retention=3600;
====================For Reference====================
http://wenku.baidu.com/view/68bf50fc0242a8956bece49d.html
https://forums.oracle.com/forums/thread.jspa?threadID=825268
=================================================