C:\Users\computer>sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jan 10 22:13:29 2013
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> grant dba to scott;
Grant succeeded.
SQL> conn scott
Enter password:
Connected.
SQL>
SQL> show user;
USER is "SCOTT"
SQL>
SQL> create table bemp as select * from emp;
create table bemp as select * from emp
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
SQL> drop table bemp;
Table dropped.
SQL> flashback table bemp to before drop;
Flashback complete.
SQL> desc bemp;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> drop table bemp;
Table dropped.
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> show user;
USER is "SYS"
SQL> flashback table scott.bemp to before drop;
Flashback complete.
SQL> DESC SCOTT.BEMP;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> DROP TABLE SCOTT.BEMP;
Table dropped.
SQL> PURGE DBA_RECYCLEBIN;
DBA Recyclebin purged.
SQL> FLASHBACK TABLE SCOTT.BEMP TO BEFORE DROP;
FLASHBACK TABLE SCOTT.BEMP TO BEFORE DROP
*
ERROR at line 1:
ORA-38305: object not in RECYCLE BIN
Comments
Post a Comment