沒有備份的資料檔案恢復(五)
環境:某個資料檔案因作業系統錯誤刪除原因被刪除而且無任何備份,資料庫執行在歸檔模式下,該資料檔案建立時間晚於於控制檔案建立時間。
[oracle@dbserv ~]$ sqlplus / as sysdba
SQL> create tablespace test datafile '/opt/oracle/oradata/test/test01.dbf' size 100M;
Tablespace created.
SQL> create table ttt tablespace test as select * from dba_users;
Table created.
SQL> select count(*) from ttt;
COUNT(*)
----------
8
SQL> insert into ttt select * from dba_users;
8 rows created.
SQL> /
8 rows created.
SQL> /
8 rows created.
SQL> commit;
Commit complete.
SQL> alter system archive log current;
System altered.
[@more@]SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
因操作失誤原因test資料檔案被刪除而且沒有備份:
SQL> host rm -f /opt/oracle/oradata/test/test01.dbf
SQL> startup
ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 1220432 bytes
Variable Size 486539440 bytes
Database Buffers 1644167168 bytes
Redo Buffers 15556608 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/opt/oracle/oradata/test/test01.dbf'
SQL> recover datafile;
ORA-02236: invalid file name
SQL> recover datafile 5;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 5: '/opt/oracle/oradata/test/test01.dbf'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/opt/oracle/oradata/test/test01.dbf'
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 5: '/opt/oracle/oradata/test/test01.dbf'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/opt/oracle/oradata/test/test01.dbf'
SQL> alter database create datafile '/opt/oracle/oradata/test/test01.dbf' ;
Database altered.
SQL> recover datafile 5;
Media recovery complete.
SQL> alter database open;
Database altered.
SQL> select count(*) from ttt;
COUNT(*)
----------
32
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18841027/viewspace-1058662/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 之利用BBED修改資料塊SCN----沒有備份資料檔案的資料恢復Oracle資料恢復
- 備份與恢復:polardb資料庫備份與恢復資料庫
- 怎樣恢復Mac檔案及資料夾資料?BackupLoupe for mac(資料恢復備份助手)3.5.4Mac資料恢復
- RMAN備份恢復典型案例——資料檔案存在壞快
- XFS檔案系統的備份、恢復、修復
- 資料庫備份恢復資料庫
- 從備份片中恢復某個指定得歸檔或者資料檔案
- gitlab的資料備份和恢復Gitlab
- 12 使用RMAN備份和恢復檔案
- 檔案的基本管理和XFS檔案系統備份恢復
- Mysql資料備份與恢復MySql
- Linux中XFS檔案系統的備份,恢復,修復Linux
- SqlServer資料庫恢復備份資料的方法SQLServer資料庫
- 如何恢復Hyper Backup備份的資料
- PostgreSql資料庫的備份和恢復SQL資料庫
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- 實戰:xfs檔案系統的備份和恢復
- Mysql資料庫備份及恢復MySql資料庫
- 達夢資料庫備份恢復資料庫
- RabbitMQ如何備份與恢復資料MQ
- 磁碟資料恢復及備份工具資料恢復
- postgresql備份與恢復資料庫SQL資料庫
- 讀資料保護:工作負載的可恢復性04備份與檔案負載
- 如何從Active Backup for Business備份中恢復檔案
- 如何備份及恢復Linux檔案許可權Linux
- RAC備份恢復之Voting備份與恢復
- 如何恢復在全備後新增了資料檔案的資料庫資料庫
- 資料庫備份與恢復技術資料庫
- Mongo 資料庫備份和恢復命令Go資料庫
- pg_dump 備份,恢復資料庫資料庫
- 備份與恢復:Polardb資料庫資料基於時間點恢復資料庫
- 【資料庫資料恢復】透過恢復NDF檔案修復資料庫的資料恢復過程資料庫資料恢復
- 帝國cms備份和恢復 帝國cms恢復資料
- 利用docker-compose恢復gitlab備份的資料DockerGitlab
- Linux下MySQL資料庫的備份與恢復LinuxMySql資料庫
- 資料庫資料恢復—無備份,binlog未開啟的Mysql資料庫資料恢復案例資料庫資料恢復MySql
- Dedecms備份的資料檔案位置及備份資料庫的方法資料庫
- C盤重灌還能恢復以前檔案嘛,重灌C盤資料備份清單
- 【資料庫資料恢復】MongoDB資料庫檔案損壞的資料恢復案例資料庫資料恢復MongoDB