- 最后登录
- 2018-11-1
- 在线时间
- 377 小时
- 威望
- 29
- 金钱
- 6866
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 891
- 精华
- 4
- 积分
- 29
- UID
- 1
|
2#
发表于 2012-12-27 15:46:51
请先搞清楚 flashback table的原理看过文档在提问!
http://docs.oracle.com/cd/B19306 ... statements_9012.htm
- conn maclean/oracle
- 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 64-bit Windows: Version 11.2.0.3.0 - Production
- NLSRTL Version 11.2.0.3.0 - Production
- CREATE FLASHBACK ARCHIVE DEFAULT fda
- TABLESPACE users
- QUOTA 1024 M
- RETENTION 100 DAY;
-
-
- SQL> create table orz (t1 int,t2 int ) flashback archive fda;
- Table created.
- SQL> create table orz (t1 int,t2 int ) flashback archive fda;
- Table created.
- SQL> insert into orz values(1,2);
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL> select current_scn from v$database;
- CURRENT_SCN
- -----------
- 10261799
- SQL>
- SQL> alter table orz drop column t2;
- Table altered.
- SQL> select * from orz;
- T1
- ----------
- 1
- SQL> select * from orz as of scn 10261799;
- T1 T2
- ---------- ----------
- 1 2
-
-
-
-
-
复制代码 11.2后的flashback archive闪回归档才能针对alter table 类的DDL闪回!!!!!!!!!!!! |
|