Home » RDBMS Server » Backup & Recovery » Offline Datafile (Oracle 9i.0.2, Windows. )
Offline Datafile [message #472583] Sun, 22 August 2010 14:48 Go to next message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi,

I had made a datafile as offline, then suddenly (without any change) I tried to take it back online. But it shows me error.
As it wants the Media Recovery for that datafile.

Question:
As there was not any changes made, why it ask me for Media Recovery?

Thanks in advance.
Re: Offline Datafile [message #472584 is a reply to message #472583] Sun, 22 August 2010 15:00 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>As there was not any changes made, why it ask me for Media Recovery?
Oracle disagrees.
Background process can & DO issue DML and COMMITS!
Re: Offline Datafile [message #472585 is a reply to message #472584] Sun, 22 August 2010 15:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Just execute a recovery, if there is anything to do then Oracle will see it.

Regards
Michel
Re: Offline Datafile [message #472586 is a reply to message #472585] Sun, 22 August 2010 15:09 Go to previous message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Here's an example (all commands executed successively without any wait but the time to type the commands, it's on my laptop, I am alone and there is only this session):
SQL> alter database datafile 'E:\ORACLE\BASES\MIKA\TEST01.DBF' offline;

Database altered.

SQL> alter database datafile 'E:\ORACLE\BASES\MIKA\TEST01.DBF' online;
alter database datafile 'E:\ORACLE\BASES\MIKA\TEST01.DBF' online
*
ERROR at line 1:
ORA-01113: file 7 needs media recovery
ORA-01110: data file 7: 'E:\ORACLE\BASES\MIKA\TEST01.DBF'


SQL> recover datafile 'E:\ORACLE\BASES\MIKA\TEST01.DBF' ;
Media recovery complete.
SQL> alter database datafile 'E:\ORACLE\BASES\MIKA\TEST01.DBF' online;

Database altered.

Regards
Michel

Previous Topic: restart database
Next Topic: Resotre full back up on a new server (With same OS and same version of Oracle) without RMAN catalog
Goto Forum:
  


Current Time: Sun Dec 22 13:43:23 CST 2024