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

ORACLE备份&恢复案例

 2008-09-09 12:52:46 来源:WEB开发网   
核心提示: 2.备份数据库SQL> @coldbak.sql 或在DOS下 svrmgrl @coldbak.sql3.再插入记录SQL> insert into test values(2);1 row insertedSQL> commit;Commit completeSQL&

2.备份数据库

SQL> @coldbak.sql 或在DOS下 svrmgrl @coldbak.sql

3.再插入记录

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

A

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

1

2

4.关闭数据库

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

5.毁坏一个或多个数据文件,如删除user01.dbf

C:>del D:ORACLEORADATATESTUSERS01.DBF

模拟媒体毁坏

6.重新启动数据库,会发现如下错误

SQL> startup
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.
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: 'D:ORACLEORADATATESTUSERS01.DBF'

在报警文件中,会有更详细的信息

Errors in file D:OracleadmintestbdumptestDBW0.TRC:
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: 'D:ORACLEORADATATESTUSERS01.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file

O/S-Error: (OS 2) 系统找不到指定的文件。

7.拷贝备份复原到原来位置(restore过程)

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

Tags:ORACLE 备份 amp

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