doh! stupid datafiles
doh! stupid datafiles 2004-11-11 - By Jesper Haure Norrevang
Bryan=2C
If you are running in archivelog mode and have all archivelogs
since the datafiles were created=2C then you can create the
datafiles and recover them completely even without a backup=2E
I have just tested it on HP-UX 8=2E1=2E7=3A
SQL=3E r
1 create tablespace test
2* datafile =27/tmp/test=2Edbf=27 size 10248 K
Tablespace created=2E
SQL=3E create table testtab
2 (f1 number)
3 tablespace test=3B
Table created=2E
SQL=3E insert into testtab values (111)=3B
1 row created=2E
SQL=3E insert into testtab values (222)=3B
1 row created=2E
SQL=3E insert into testtab values (333)=3B
1 row created=2E
SQL=3E insert into testtab values (444)=3B
1 row created=2E
SQL=3E insert into testtab values (555)=3B
1 row created=2E
SQL=3E insert into testtab values (666)=3B
1 row created=2E
SQL=3E commit=3B
Commit complete=2E
SQL=3E ! rm /tmp/test=2Edbf
SQL=3E select *
2 from testtab=3B
from testtab
*
ERROR at line 2=3A
ORA-00376 (See ORA-00376.ora-code.com )=3A file 12 cannot be read at this time
ORA-01110 (See ORA-01110.ora-code.com )=3A data file 12=3A =27/tmp/test=2Edbf=27
SQL=3E alter database create datafile =27/tmp/test=2Edbf=27=3B
Database altered=2E
SQL=3E alter database recover datafile =27/tmp/test=2Edbf=27=3B
SQL=3E alter database recover logfile =27/arch01/ORACLE/SJTEST/arch/arch=5F=
SJTEST=5F0000005247=5F0001=2Elog=27=3B
ORA-00279 (See ORA-00279.ora-code.com )=3A change 20741012 =2E=2E=2E
SQL=3E alter database recover logfile =27/arch01/ORACLE/SJTEST/arch/arch=5F=
SJTEST=5F0000005248=5F0001=2Elog=27=3B
=2E=2E=2E
SQL=3E alter database recover logfile =27/arch01/ORACLE/SJTEST/arch/arch=5F=
SJTEST=5F0000005249=5F0001=2Elog=27=3B
=2E=2E=2E
SQL=3E alter database recover logfile =27/arch01/ORACLE/SJTEST/arch/arch=5F=
SJTEST=5F0000005250=5F0001=2Elog=27=3B
Database altered=2E
SQL=3E alter tablespace test online=3B
Tablespace altered=2E
SQL=3E select *
2 from testtab=3B
F1
-- ---- --
111
222
333
444
555
666
6 rows selected=2E
SQL=3E
Regards
Jesper Haure N=F8rrevang
-- -- Original Message -- --
From=3A Bryan Wells =3Cbunjibry=40gmail=2Ecom=3E
Date=3A Thursday=2C November 11=2C 2004 5=3A40 pm
Subject=3A doh! stupid datafiles
=3E Running 8=2E1=2E7 on Solaris 8=2E Yesterday I deleted 2 datafiles=2C=
luckily
=3E in a non-production environment=2E However=2C this system does not g=
et
=3E backed up=2E Im thinking I am most likely stuck recreating this
=3E database from the production instance=2E is this my only option=2C a=
nd
=3E what is the doc id in metalink that can walk me through this=2E
=3E =
=3E -- =
=3E Bryan S Wells
=3E bunjibry=40gmail=2Ecom
=3E --
=3E http=3A//www=2Efreelists=2Eorg/webpage/oracle-l
=3E
--
http://www.freelists.org/webpage/oracle-l