Berikut adalah cara Recover DataFile pada Oracle :
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}}
\viewkind4\uc1\pard\f0\fs20 1. status database open\par
\par
-- utk melihat status pada datafile\par
select d.file# f#, d.name, d.status, h.status\par
from v$datafile d, v$datafile_header h\par
where d.file#= h.file#\par
\par
tampilan :\par
F# SUBSTR(D.NAME,1,30) STATUS STATUS\par
--- ------------------------------ ------- -------\par
1 E:\\DATA\\WMSBASE\\SYSTEM01.DBF SYSTEM ONLINE\par
2 F:\\INDEX\\WMSBASE\\UNDOTBS01.DBF RECOVER OFFLINE --- yang perlu direcover datafile\par
3 E:\\DATA\\WMSBASE\\SYSAUX01.DBF ONLINE ONLINE\par
4 E:\\DATA\\WMSBASE\\USERS01.DBF ONLINE ONLINE\par
5 E:\\DATA\\WMSBASE\\AHP_DAT_01.ORA ONLINE ONLINE\par
6 F:\\INDEX\\WMSBASE\\AHP_IDX_01.OR ONLINE ONLINE\par
7 E:\\DATA\\WMSBASE\\APPLSYS_DAT_01 ONLINE ONLINE\par
8 E:\\DATA\\WMSBASE\\GSO_DAT_01.ORA ONLINE ONLINE\par
9 F:\\INDEX\\WMSBASE\\GSO_IDX_01.OR ONLINE ONLINE\par
10 E:\\DATA\\WMSBASE\\ISDS_DATA_01.O ONLINE ONLINE\par
11 E:\\DATA\\WMSBASE\\MAINDEALER_DAT ONLINE ONLINE\par
\par
F# SUBSTR(D.NAME,1,30) STATUS STATUS\par
--- ------------------------------ ------- -------\par
12 F:\\INDEX\\WMSBASE\\MAINDEALER_ID ONLINE ONLINE\par
13 E:\\DATA\\WMSBASE\\PAYROLL_DAT_01 ONLINE ONLINE\par
14 F:\\INDEX\\WMSBASE\\PAYROLL_IDX_0 ONLINE ONLINE\par
15 E:\\DATA\\WMSBASE\\WDS_DAT_01.ORA ONLINE ONLINE\par
16 E:\\DATA\\WMSBASE\\WDSCAB_DAT_01. ONLINE ONLINE\par
17 F:\\INDEX\\WMSBASE\\WDS_IDX_01.OR ONLINE ONLINE\par
18 E:\\DATA\\WMSBASE\\WHDS_DAT_01.OR ONLINE ONLINE\par
19 F:\\INDEX\\WMSBASE\\WHDS_IDX_01.O ONLINE ONLINE\par
20 F:\\INDEX\\WMSBASE\\UNDOTBS02.DBF ONLINE ONLINE\par
\par
kalau status nya online, maka ubah menjadi offline\par
SQL> alter database datafile 'F:\\INDEX\\WMSBASE\\UNDOTBS01.DBF' offline;\par
Database altered.\par
lalu recover datafile dengan sintax :\par
\par
SQL> recover datafile 'F:\\INDEX\\WMSBASE\\UNDOTBS01.DBF';\par
Media recovery complete.\par
\par
lihat lagi statusnya :\par
-- utk melihat status pada datafile\par
select d.file# f#, d.name, d.status, h.status\par
from v$datafile d, v$datafile_header h\par
where d.file#= h.file#\par
\par
tampilan :\par
F# SUBSTR(D.NAME,1,30) STATUS STATUS\par
--- ------------------------------ ------- -------\par
1 E:\\DATA\\WMSBASE\\SYSTEM01.DBF SYSTEM ONLINE\par
2 F:\\INDEX\\WMSBASE\\UNDOTBS01.DBF OFFLINE OFFLINE -- status sdh direcover datafile\par
3 E:\\DATA\\WMSBASE\\SYSAUX01.DBF ONLINE ONLINE\par
4 E:\\DATA\\WMSBASE\\USERS01.DBF ONLINE ONLINE\par
5 E:\\DATA\\WMSBASE\\AHP_DAT_01.ORA ONLINE ONLINE\par
6 F:\\INDEX\\WMSBASE\\AHP_IDX_01.OR ONLINE ONLINE\par
7 E:\\DATA\\WMSBASE\\APPLSYS_DAT_01 ONLINE ONLINE\par
8 E:\\DATA\\WMSBASE\\GSO_DAT_01.ORA ONLINE ONLINE\par
9 F:\\INDEX\\WMSBASE\\GSO_IDX_01.OR ONLINE ONLINE\par
10 E:\\DATA\\WMSBASE\\ISDS_DATA_01.O ONLINE ONLINE\par
11 E:\\DATA\\WMSBASE\\MAINDEALER_DAT ONLINE ONLINE\par
\par
F# SUBSTR(D.NAME,1,30) STATUS STATUS\par
--- ------------------------------ ------- -------\par
12 F:\\INDEX\\WMSBASE\\MAINDEALER_ID ONLINE ONLINE\par
13 E:\\DATA\\WMSBASE\\PAYROLL_DAT_01 ONLINE ONLINE\par
14 F:\\INDEX\\WMSBASE\\PAYROLL_IDX_0 ONLINE ONLINE\par
15 E:\\DATA\\WMSBASE\\WDS_DAT_01.ORA ONLINE ONLINE\par
16 E:\\DATA\\WMSBASE\\WDSCAB_DAT_01. ONLINE ONLINE\par
17 F:\\INDEX\\WMSBASE\\WDS_IDX_01.OR ONLINE ONLINE\par
18 E:\\DATA\\WMSBASE\\WHDS_DAT_01.OR ONLINE ONLINE\par
19 F:\\INDEX\\WMSBASE\\WHDS_IDX_01.O ONLINE ONLINE\par
20 F:\\INDEX\\WMSBASE\\UNDOTBS02.DBF ONLINE ONLINE\par
\par
lalu online status \par
SQL> alter database datafile 'F:\\INDEX\\WMSBASE\\UNDOTBS01.DBF' online;\par
Database altered.\par
\par
lalu lihat lagi untuk memastikan :\par
-- utk melihat status pada datafile\par
select d.file# f#, d.name, d.status, h.status\par
from v$datafile d, v$datafile_header h\par
where d.file#= h.file#\par
\par
tampilan :\par
F# SUBSTR(D.NAME,1,30) STATUS STATUS\par
--- ------------------------------ ------- -------\par
1 E:\\DATA\\WMSBASE\\SYSTEM01.DBF SYSTEM ONLINE\par
2 F:\\INDEX\\WMSBASE\\UNDOTBS01.DBF ONLINE ONLINE -- status datafile sdh siap digunakan\par
3 E:\\DATA\\WMSBASE\\SYSAUX01.DBF ONLINE ONLINE\par
4 E:\\DATA\\WMSBASE\\USERS01.DBF ONLINE ONLINE\par
5 E:\\DATA\\WMSBASE\\AHP_DAT_01.ORA ONLINE ONLINE\par
6 F:\\INDEX\\WMSBASE\\AHP_IDX_01.OR ONLINE ONLINE\par
7 E:\\DATA\\WMSBASE\\APPLSYS_DAT_01 ONLINE ONLINE\par
8 E:\\DATA\\WMSBASE\\GSO_DAT_01.ORA ONLINE ONLINE\par
9 F:\\INDEX\\WMSBASE\\GSO_IDX_01.OR ONLINE ONLINE\par
10 E:\\DATA\\WMSBASE\\ISDS_DATA_01.O ONLINE ONLINE\par
11 E:\\DATA\\WMSBASE\\MAINDEALER_DAT ONLINE ONLINE\par
\par
F# SUBSTR(D.NAME,1,30) STATUS STATUS\par
--- ------------------------------ ------- -------\par
12 F:\\INDEX\\WMSBASE\\MAINDEALER_ID ONLINE ONLINE\par
13 E:\\DATA\\WMSBASE\\PAYROLL_DAT_01 ONLINE ONLINE\par
14 F:\\INDEX\\WMSBASE\\PAYROLL_IDX_0 ONLINE ONLINE\par
15 E:\\DATA\\WMSBASE\\WDS_DAT_01.ORA ONLINE ONLINE\par
16 E:\\DATA\\WMSBASE\\WDSCAB_DAT_01. ONLINE ONLINE\par
17 F:\\INDEX\\WMSBASE\\WDS_IDX_01.OR ONLINE ONLINE\par
18 E:\\DATA\\WMSBASE\\WHDS_DAT_01.OR ONLINE ONLINE\par
19 F:\\INDEX\\WMSBASE\\WHDS_IDX_01.O ONLINE ONLINE\par
20 F:\\INDEX\\WMSBASE\\UNDOTBS02.DBF ONLINE ONLINE\par
\par
\par
\par
}