WEB开发网
开发学院数据库Oracle 用Flashback database功能恢复用户错误 阅读

用Flashback database功能恢复用户错误

 2008-12-16 13:04:44 来源:WEB开发网   
核心提示: (6)最后继续修正恢复SYS AS SYSDBA on 2005-03-29 17:07:42 >alter database close;Database altered.SYS AS SYSDBA on 2005-03-29 17:07:49 >flashback data

(6)最后继续修正恢复

SYS AS SYSDBA on 2005-03-29 17:07:42 >alter database close;
Database altered.
SYS AS SYSDBA on 2005-03-29 17:07:49 >flashback database to timestamp
 2 to_timestamp ('2005-03-29 17:02:48','yyyy-mm-dd hh24:mi:ss');
Flashback complete.
SYS AS SYSDBA on 2005-03-29 17:08:17 >alter database open;
alter database open
*
ERROR at line 1:
ORA-16196: database has been previously opened and closed
SYS AS SYSDBA on 2005-03-29 17:08:24 >alter database dismount;
Database altered.
SYS AS SYSDBA on 2005-03-29 17:08:35 >shutdown
ORA-01507: database not mounted
ORACLE instance shut down.
SYS AS SYSDBA on 2005-03-29 17:08:48 >startup mount;
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size         1301704 bytes
Variable Size       261890872 bytes
Database Buffers      50331648 bytes
Redo Buffers        1048576 bytes
Database mounted.
SYS AS SYSDBA on 29-MAR-05 >alter database open read only;
Database altered.
SYS AS SYSDBA on 29-MAR-05 >select count(*) from t1;
 COUNT(*)
----------
    12

(7)resetlogs打开数据库

SYS AS SYSDBA on 29-MAR-05 >shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS AS SYSDBA on 29-MAR-05 >startup mount
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size         1301704 bytes
Variable Size       261890872 bytes
Database Buffers      50331648 bytes
Redo Buffers        1048576 bytes
Database mounted.
SYS AS SYSDBA on 29-MAR-05 >alter database open resetlogs;
Database altered.
SYS AS SYSDBA on 29-MAR-05 >

注释:resetlogs后,则不会再flashback到resetlogs之前的时间点。

上一页  1 2 3 4 

Tags:Flashback database 功能

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接