Tuesday, 26 November 2019

flashback database


     (If we dropped the table with purge condition means dropped table not stored in recyclebin completely dropped.for that condition we use the flashback database command only)

(for tablespace dropped condition also we use the flashback database command...)

17:35:05 SQL> drop table prod purge;

Table dropped.

17:36:11 SQL> flashback table prod to before drop;
flashback table prod to before drop
*
ERROR at line 1:
ORA-38305: object not in RECYCLE BIN


17:36:26 SQL> shu immediate;
ORA-01031: insufficient privileges
17:36:34 SQL> connect /as sysdba
Connected.
17:36:42 SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
17:37:34 SQL> startup mount
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1248600 bytes
Variable Size             104858280 bytes
Database Buffers          180355072 bytes
Redo Buffers                7139328 bytes
Database mounted.
17:37:56 SQL> flashback database to timestamp TO_TIMESTAMP('2012-05-03 17:35:05','YYYY-MM-DD HH24:MI
:SS');

Flashback complete.

17:38:53 SQL> alter database open resetlogs;

Database altered.

17:39:19 SQL> connect svss
Enter password: ****
Connected.
17:39:27 SQL> select * from prod;

        ID
----------
        34
        34
        34
        45
        45
        78
        67
        67
        23
        23
        23

        ID
----------
        45
        45
        78
        67
        67
        34
        34
        34
        34

20 rows selected.

17:39:35 SQL>

No comments:

Post a Comment