使用 Flashback 恢复删除的 tablespace --实验
2014-08-11 22:23
302 查看
sys@LS1>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@LS1>startup mount;
ORACLE instance started.
Total System Global Area 855982080 bytes
Fixed Size 2218152 bytes
Variable Size 633341784 bytes
Database Buffers 213909504 bytes
Redo Buffers 6512640 bytes
Database mounted.
sys@LS1>alter database archivelog;
Database altered.
sys@LS1>alter database flashback on;
Database altered.
sys@LS1>alter database open;
Database altered.
sys@LS1>create tablespace tb1 datafile '/u01/oradata/ls1/tb1.dbf' size 1m;
Tablespace created.
sys@LS1>create user tb1 identified by tb1;
User created.
sys@LS1>grant dba to tb1;
Grant succeeded.
sys@LS1>alter user tb1 default tablespace tb1;
User altered.
sys@LS1>create table tb (id number);
Table created.
sys@LS1>select current_scn from v$database;
CURRENT_SCN
-----------
5060095
sys@LS1>drop tablespace tb1 including contents and datafiles;
Tablespace dropped.
sys@LS1>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@LS1>startup mount
ORACLE instance started.
Total System Global Area 855982080 bytes
Fixed Size 2218152 bytes
Variable Size 633341784 bytes
Database Buffers 213909504 bytes
Redo Buffers 6512640 bytes
Database mounted.
sys@LS1>flashback database to scn 5060095;
Flashback complete
sys@LS1>select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------
/u01/oracle/dbs/UNNAMED00009
sys@LS1>alter database open resetlogs;
Database altered.
sys@LS1>select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------
/u01/oracle/dbs/UNNAMED00009
sys@LS1>flashback database to scn 5060095;
Flashback complete.
sys@LS1> alter database open resetlogs;
Database altered.
sys@LS1>select * from tb;
no rows selected
sys@LS1>select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------
/u01/oradata/ls1/tb1.dbf
sys@LS1>select name from v$tablespace;
NAME
------------------------------
TB1
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@LS1>startup mount;
ORACLE instance started.
Total System Global Area 855982080 bytes
Fixed Size 2218152 bytes
Variable Size 633341784 bytes
Database Buffers 213909504 bytes
Redo Buffers 6512640 bytes
Database mounted.
sys@LS1>alter database archivelog;
Database altered.
sys@LS1>alter database flashback on;
Database altered.
sys@LS1>alter database open;
Database altered.
sys@LS1>create tablespace tb1 datafile '/u01/oradata/ls1/tb1.dbf' size 1m;
Tablespace created.
sys@LS1>create user tb1 identified by tb1;
User created.
sys@LS1>grant dba to tb1;
Grant succeeded.
sys@LS1>alter user tb1 default tablespace tb1;
User altered.
sys@LS1>create table tb (id number);
Table created.
sys@LS1>select current_scn from v$database;
CURRENT_SCN
-----------
5060095
sys@LS1>drop tablespace tb1 including contents and datafiles;
Tablespace dropped.
sys@LS1>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@LS1>startup mount
ORACLE instance started.
Total System Global Area 855982080 bytes
Fixed Size 2218152 bytes
Variable Size 633341784 bytes
Database Buffers 213909504 bytes
Redo Buffers 6512640 bytes
Database mounted.
sys@LS1>flashback database to scn 5060095;
Flashback complete
sys@LS1>select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------
/u01/oracle/dbs/UNNAMED00009
sys@LS1>alter database open resetlogs;
Database altered.
sys@LS1>select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------
/u01/oracle/dbs/UNNAMED00009
sys@LS1>flashback database to scn 5060095;
Flashback complete.
sys@LS1> alter database open resetlogs;
Database altered.
sys@LS1>select * from tb;
no rows selected
sys@LS1>select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------
/u01/oradata/ls1/tb1.dbf
sys@LS1>select name from v$tablespace;
NAME
------------------------------
TB1
相关文章推荐
- 使用Oracle9i的新特性Flashback Query恢复误删除数据
- 实验:模拟场景中误删除mysql数据库表,然后使用全备份以及二进制日志文件恢复操作
- 使用Oracle9i的新特性Flashback Query恢复误删除数据
- oracle 使用DBMS_FLASHBACK恢复意外删除的数据
- oracle 使用flashback(闪回)恢复误删除的数据 或 误删除的表
- 使用Oracle9i的新特性Flashback Query恢复误删除数据
- oracle 使用DBMS_FLASHBACK恢复意外删除的数据
- 使用flashback query恢复被删除plsql
- 使用Oracle9i的新特性Flashback Query恢复误删除数据
- oracle 使用flashback(闪回)恢复误删除的数据 或 误删除的表
- 使用重复数据删除进行灾难恢复和达到RTO
- 使用mc恢复被删除文件
- 使用ext3grep恢复ext3文件系统中误删除文件
- 20.1 使用FlashBack 查询实现行级恢复
- 20.1 使用FlashBack 查询实现行级恢复
- 20.4 使用FLASHBACK DATABASE 恢复数据库到先前状态
- 20.4 使用FLASHBACK DATABASE 恢复数据库到先前状态
- 使用RevertRecord方法恢复在缓冲区中被删除的记录
- 20.3 使用FLASHBACK TABLE 恢复被删除表
- Linux系统下 使用Lsof恢复误删除的文件