Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Backup & Recovery >> Datafile OFFLINE...........

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Datafile OFFLINE...........
 Navi  Posted: Aug 23, 2007 01:38:24 PM

 Total Post: 60
 Joined: Jun, 2007






 Hi,
I started the database in ArchiveLog mode and i took a datafile offline after that when i tried to take datafile online it gave following error:-

SQL> alter database datafile 'C:\oracle\oradata\Venkat\navdbf.dbf' online;
alter database datafile 'C:\oracle\oradata\Venkat\navdbf.dbf' online
*
ERROR at line 1:
ORA-01113: file 9 needs media recovery
ORA-01110: data file 9: 'C:\ORACLE\ORADATA\VENKAT\NAVDBF.DBF'

After that when i gave "recover database" command i got the following error:-

SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 1 - file is in use or recovery
ORA-01110: data file 1: 'C:\ORACLE\ORADATA\VENKAT\SYSTEM01.DBF'

Before taking datafile offline i dint took any backup and when it asked for media recover i dint had any backup to restore just i gave
"RECOVER DATABASE"

1) Before taking Datafile or tablespace offline whether i need to take backup of all the files?
2) Why i am getting this error? Just i took datafile from offline to online?
Please guide me.

Regards,
Naveen




 KS
Posted: Aug 27, 2007 08:55:01 AM  

 Total Post: 65
 Joined: Nov, 2006






 
Navi,
I hope this will answer ur question,

C:\>set oracle_sid=live
C:\>sqlplus system/manager

SQL> ALTER DATABASE DATAFILE 'F:\oradata\live\Mydb02.ora' RESIZE 600k;
Database altered.

SQL> ALTER DATABASE DATAFILE 'F:\oradata\live\Mydb02.ora' OFFLINE;
Database altered.

SQL> ALTER DATABASE DATAFILE 'F:\oradata\live\Mydb02.ora' ONLINE;
ALTER DATABASE DATAFILE 'F:\oradata\live\Mydb02.ora' ONLINE
*
ERROR at line 1:
ORA-01113: file 16 needs media recovery
ORA-01110: data file 16: 'F:\ORADATA\LIVE\Mydb02.ORA'

SQL> RECOVER DATAFILE 'F:\oradata\live\Mydb02.ora';
Media recovery complete.

SQL> ALTER DATABASE DATAFILE 'F:\oradata\live\Mydb02.ora' ONLINE;
Database altered

In the above example, the file recovery is needed to update the timestamp in the offline datafile header.


-- SK


 nick
Posted: Sep 11, 2007 03:32:46 PM  

 Total Post: 30
 Joined: Sep, 2007






 
without taking any file offline, if you take the backup by just copying and pasting and then while restoring the same media recovery will be required as the files would have diffrent time stamps and will not be identified by control files or database.

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar843
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gitesh Trivedi322
  Gopu Gopi272
  neeraj sharma252
  Ramesh Jois245
  Bishal Khetan207






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software