My development database is not opening, it's on of datafile
corrupted, How can I recover datafiles.
I do not care about data on that datafile. But all other datafiles is important to me.
I am not able to start database
recover database, recover tabalaspec, recover datafiles doew not work.
I created other datafiles by alter database create ' ' as' ' '
and when I try to recreate it is asking me archive log.
I do not have any archive log ???
Can you afford to loose the datafile? on such case what you can do is:
Mount the instance
select * from v$recover_file;
alter database datafile 'path/filename' offline drop;
alter database open;
ORA-01145: offline immediate disallowed unless media recovery enabled
it gives me this message I just try to make it offline , not drop
what if the datafile is important and it is required .
In that scenario what needs to be done
First comming to answer the question of Kumud,
Since you are in the no-archive mode you can only do offline drop and not offline immediate.
Now comming to answer the question of Gayathri, Since the database is not in the archive mode, point in time recovery is not feasible. So to resolve this issue, things that can be done are
I hope this would answer your question.
Mount the database
alter database datafile '/../filename' offline;
alter database open;
restore the backup copies of the damaged datafile
recover tablespace tablespace_name;
alter tablespace tablespace_name online;
correct me .
If the datafile which got corrupted and was important but no backup available , in any case u have to take the datafile offline and start the database.
The database will be open.
But u cannot get the file back. right ?
sam thanks once again
if you dont have logs and you are not in archive mode forget about recover tablespace, recover datafile commnad, those can only be issued in archive log mode
you have to delete the whole tablespace if you dont want that datafile disturbs you in the future, offline drop wont do you any good, just gives you problems in the future if you dont delete it the tablespace now
offline drop does not drop files, still it shows.
basically My disk is full and I am moving my most of datfiles on other disk.
alter tablespace tbs offline;
alter tablespace tbs rename file 'xxx' to 'yyy';
recover datafile 'yyy'
after that my datafiles get corrupted it gives ora 1122, ora1110m ora 1251.
why you do recover datafile 'yyy' ????
you did offline not offline immediate there is no need to recover whatsoever
To answers Gayatri's question:
Even if you don't have a backup of a datafile, still u can recover the database provided the database in running in ARCHIVELOG mode and you have all the ARCHIVED LOGFILES from the time at which the datafile was created.