rman实验之归档模式无备份,正常关机丢失数据文件的恢复
rman实验之归档模式无备份,正常关机丢失数据文件的恢复
并不是所有数据文件丢失都能够直接被恢复,如system;也不是所有数据文件丢失都需要恢复,如temp表空间。
下面模拟一张业务表。
1 创建演示环境
- sys@ORCL> archive log list;
- Database log mode Archive Mode
- Automatic archival Enabled
- Archive destination USE_DB_RECOVERY_FILE_DEST
- Oldest online log sequence 16
- Next log sequence to archive 18
- Current log sequence 18
- sys@ORCL> create tablespace think datafile '/u01/app/Oracle/oradata/ORCL/datafile/think.dbf' size 10m;
- Tablespace created.
- sys@ORCL> create user think identified by think default tablespace think quota unlimited on think;
- User created.
- sys@ORCL> grant connect,resource to think;
- Grant succeeded.
- sys@ORCL> conn think/think
- Connected.
- think@ORCL> create table tt (name varchar2(20));
- Table created.
- think@ORCL> insert into tt values('think');
- 1 row created.
- think@ORCL> commit;
- Commit complete.
- think@ORCL> select * from tt;
- NAME
- --------------------
- think
2 模拟数据文件丢失
- sys@ORCL> shutdown immediate;
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- sys@ORCL> host rm -rf /u01/app/oracle/oradata/ORCL/datafile/think.dbf
- 重新启动数据库
- sys@ORCL> startup
- ORACLE instance started.
- Total System Global Area 419430400 bytes
- Fixed Size 1219760 bytes
- Variable Size 125829968 bytes
- Database Buffers 289406976 bytes
- Redo Buffers 2973696 bytes
- Database mounted.
- ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
- ORA-01110: data file 8: '/u01/app/oracle/oradata/ORCL/datafile/think.dbf'
|
评论暂时关闭