Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: recovery from ORA-01200 error

Re: recovery from ORA-01200 error

From: Brad Peek <bpeek_at_dallas.net>
Date: Thu, 15 Mar 2001 00:55:51 -0600
Message-ID: <tb0pspm7vhrka4@corp.supernews.com>

I probably shouldn't try to answer this because its been a while since I've done it but....

The short answer is "you are pretty much hosed". However, if you happen to have ALL of the archived redo logs since the data file was created, there is a way to do it. My guess is that you aren't even running in ARCHIVELOG mode. Right? Let me know if you want to try it and I can point you to some doc on how to do it (not too bad). Here is an excerpt:



To re-create a datafile for recovery:

Create a new, empty datafile to replace a damaged datafile that has no corresponding backup. For example, assume that the datafile disk1:users1 has been damaged, and no backup is available. The following statement re-creates the original datafile (same size) on disk2:

ALTER DATABASE CREATE DATAFILE 'disk1:users1' AS 'disk2:users1';

This statement creates an empty file that matches the lost file. Oracle looks at information in the control file and the data dictionary to obtain size information. The old datafile is renamed as the new datafile.

Perform media recovery on the empty datafile. For example, enter:

RECOVER DATAFILE 'disk2:users1'

All archived redo logs written since the original datafile was created must be mounted and reapplied to the new, empty version of the lost datafile during recovery.


If recovering from the redo logs is not an option, you MAY be able to come up with a running instance if you are willing to drop the tablespace and lose all of its contents. This is where my memory is fuzzy, so check it out before you try it....

startup nomount
alter database datafile '/data/oradata/ORCL/users01.dbf' offline; alter database open;
alter tablespace USERS offline;
DROP TABLESPACE users

    INCLUDING CONTENTS
        CASCADE CONSTRAINTS; Good luck

"Braxton Robbason" <robbason_at_hotmail.com> wrote in message news:tavu4ccfu7fc7c_at_corp.supernews.com...
> hi all. I have a development db server that I crashed in a most horrible
> way. I had a program writing data into the USERS tablespace, which was
> stored in one big file that got to be too large for the disk to hold.
>
> now, when I try to start the database I get:
>
> ORA-01122: database file 5 failed verification check
> ORA-01110: data file 5: '/data/oradata/ORCL/users01.dbf'
> ORA-01200: actual file size of 2027014 is smaller than correct size of
> 2097138 blocks
>
> I know I am supposed to restore from a backup at this point. I don't have
 a
> backup because this is just a development server. do I have to delete
 this
> database and make a new one or is there a way to maybe even lose the whole
> tablespace but recover the database itself? I feel like there should be a
> way to hack it.
>
> Sheepishly,
>
> Braxton
>
>
Received on Thu Mar 15 2001 - 00:55:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US