ITPub博客

首页 > Linux操作系统 > Linux操作系统 > flashback怎样找回drop掉的用户

flashback怎样找回drop掉的用户

原创 Linux操作系统 作者:libingquan008 时间:2011-05-20 11:37:28 0 删除 编辑

在flashback开启的情况下,而且有足够的flashback log的前提下,是可以通过flashback database 闪回drop掉的用户的。
SQL code
SQL> create user me identified by oracle; User created. SQL> grant dba to me; Grant succeeded. SQL> connect me/oracle Connected. SQL> create table test (f1 varchar2(10)); Table created. SQL> insert into test values ('hello'); 1 row created. SQL> commit; Commit complete. SQL> conn / as sysdba Connected. SQL> select to_char(sysdate,'yyyymmddhh24miss') from dual; TO_CHAR(SYSDAT -------------- 20090915124126 SQL> drop user me; drop user me * ERROR at line 1: ORA-01922: CASCADE must be specified to drop 'ME' SQL> drop user me cascade; User dropped. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 1157627904 bytes Fixed Size 2072224 bytes Variable Size 419430752 bytes Database Buffers 721420288 bytes Redo Buffers 14704640 bytes Database mounted. SQL> flashback database to timestamp to_timestamp('20090915124126','yyyymmddhh24miss'); Flashback complete. SQL> alter database open resetlogs; Database altered. SQL> conn me/oracle Connected. SQL> select * from test; F1 ---------- hello

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22878696/viewspace-695819/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-02-10

  • 博文量
    46
  • 访问量
    119416