WEB开发网
开发学院数据库Oracle ORACLE备份&恢复案例(2) 阅读

ORACLE备份&恢复案例(2)

 2008-09-09 12:52:41 来源:WEB开发网   
核心提示: 3、删除测试表,假定删除前的时间为T1,ORACLE备份&恢复案例(2)(3),在删除之前,便于测试,继续插入数据并应用到归档,SQL> insert into test values(2);1 row insertedSQL> commit;Commit comple

3、删除测试表,假定删除前的时间为T1,在删除之前,便于测试,继续插入数据并应用到归档。

SQL> insert into test values(2);
1 row inserted
SQL> commit;
Commit complete
SQL> select * from test;
A

---------------------------------------

1
2
SQL> alter system switch logfile;
Statement processed.
SQL> alter system switch logfile;
Statement processed.
SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'YY
-------------------
2003-05-21 14:43:01
SQL> drop table test;
Table dropped.

4、准备恢复到时间点T1,找回删除的表,先关闭数据库

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

5、拷贝刚才备份的所有数据文件回来

C:>copy D:DATABAK*.DBF D:ORACLEORADATATEST

6、启动到mount下

SQL> startup mount;
ORACLE instance started.
Total System Global Area 102020364 bytes
Fixed Size 70924 bytes
Variable Size 85487616 bytes
Database Buffers 16384000 bytes
Redo Buffers 77824 bytes
Database mounted.

7、开始不完全恢复数据库到T1时间

SQL> recover database until time '2003-05-21:14:43:01';
ORA-00279: change 30944 generated at 05/21/2003 14:40:06 needed for thread 1
ORA-00289: suggestion : D:ORACLEORADATATESTARCHIVETESTT001S00191.ARC
ORA-00280: change 30944 for thread 1 is in sequence #191
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
Log applied.
Media recovery complete.

上一页  1 2 3 4 5 6 7 8  下一页

Tags:ORACLE 备份 amp

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