SQL> startup
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 1279916 bytes
Variable Size 503318612 bytes
Database Buffers 704643072 bytes
Redo Buffers 15495168 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/home/oracle/test01.dbf'
The standard way to recover the lost datafile:
-bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Thu Apr 9 11:11:57 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1203857279)
RMAN> Recover copy of datafile 6;
Starting recover at 09-APR-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=120 devtype=DISK
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy fno=00006 name=/home/oracle/backup/orcl_data_D-ORCL_I-1203857279_TS-TEST_FNO-6_0qkc1b85.bak
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/orcl_0ukc1gpo_1_1.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/backup/orcl_0ukc1gpo_1_1.bak tag=TAG20090409T103848
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished recover at 09-APR-09
Starting Control File and SPFILE Autobackup at 09-APR-09
piece handle=/export/home/workzone/database/oracle/10g/flash_recovery_area/ORCL/autobackup/2009_04_09/o1_mf_s_683723525_4xtsw5c3_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 09-APR-09
see the change to image copy:
bash-3.00$ ls -lrt
total 224704
-rw-r----- 1 oracle oinstall 10108928 Apr 9 10:40 orcl_0ukc1gpo_1_1.bak
-rw-r----- 1 oracle oinstall 104865792 Apr 9 11:12 orcl_data_D-ORCL_I-1203857279_TS-TEST_FNO-6_0qkc1b85.bak
bash-3.00$
go on the rman recover.
RMAN> switch datafile 6 to copy;
datafile 6 switched to datafile copy "/home/oracle/backup/orcl_data_D-ORCL_I-1203857279_TS-TEST_FNO-6_0qkc1b85.bak"
RMAN> recover datafile 6;
Starting recover at 09-APR-09
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 09-APR-09
From SQLPLUS side:
SQL> conn / as sysdba
Connected.
SQL> select * from v$recover_file;
no rows selected
SQL> alter database datafile 6 online;
Database altered.
SQL> conn test/test
Connected.
SQL> select count(*) from test;
COUNT(*)
----------
3
SQL> select file_name,file_id from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
FILE_ID
----------
/export/home/workzone/database/oracle/oradata/orcl/users01.dbf
4
/export/home/workzone/database/oracle/oradata/orcl/sysaux01.dbf
3
/export/home/workzone/database/oracle/oradata/orcl/undotbs01.dbf
2
FILE_NAME
--------------------------------------------------------------------------------
FILE_ID
----------
/export/home/workzone/database/oracle/oradata/orcl/system01.dbf
1
/export/home/workzone/database/oracle/oradata/orcl/example01.dbf
5
/home/oracle/backup/orcl_data_D-ORCL_I-1203857279_TS-TEST_FNO-6_0qkc1b85.bak
6
6 rows selected.
分享到:
相关推荐
The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface......................
(3) File extensions and packages:.......................................................................14 2.2 Go Environment variables...................................................................
How to recover an unbootable file system Who this book is for IT Pros, Windows expert and power users and system administrators are the audience for this book. Table of Contents Chapter 1: An ...
SQLServer简单模式恢复删除数据ApexSQL.Recover.2016.02.1166
Select the Recover... item in the File menu. A file selection dialog will appear. Select the file to search password for. Press the "Open" button to start recovery. Tips You can use shortcut Ctrl+...
上尚城配电(一期)_recover_recover_recover.dwg11111111111111111111111111111111111111111111111111111111
Please note that it cannot be told in advance, if a specific file can be recovered with Recover4all?or not (see Unrecoverable files). Recover4all?makes it very easy to recover deleted files. They ...
The user can’t choose the place they recover the file to and can’t see the content of a file in Cycle Bin. HE6—Good Feature The shortcut mean of the Cycle Bin have similar style with other windows...
恢复文件工具.GetData.Recover.My.Files.Professional.v4.0.rar
Please read the following terms and conditions carefully because they will apply to Your use of both the unregistered and registered versions of the software program Recover4all(tm) Professional and ...
[恢复我的文件].GetData.Recover.My.Files.Professional.v4.0.rar 最好的恢复软件,帮助你找回误删除的东东
Added TFlexFileFormat.StreamSupport property (default True), which difines, is it necessary to open file stream or give the file name only. - FIX: If the TCustomProp.Assign method calls when the ...
解决win10 找不到 gpedit.msc 组策略编辑器的问题。以管理员模式运行gpedit-recover.bat ,耐心等待直到运行完毕,即可在运行里面正常执行gpedit.msc
recover.my.files.3.98.6081文件误删除恢复工具
V2EX 克隆项目升级 Vue.js 1.x to 2.0
Odin Data Recovery Professional also can help computer users Specify file types before file recovery to find lost files quickly and save previous searching results for continuous recovery. It ...
SQLserver数据恢复
An Introduction to Visual Basic .NET ................................................................................2 Install Visual Studio .NET..........................................................
3. Add the ACME_URL and ACME_Credential to the Config file. 4. Populate InitAllApplications.xaml from the Framework folder with Invoking the Login to ACME and navigation to the Work Items. 5. ...
PC Tools File Recover是一款数据恢复工具,通过它你可以恢复已经清空回收站的数据,恢复已删除的文件,支持硬盘/SSD固态硬盘、软盘以及USB移动外设等媒体介质,支持快速扫描、深度扫描、物理扫描。可以按文件...