Why recovering the datafile ?

Hi,
why must we recover a datafile after taking it offline (without restore) to take it online again:
SQL*Plus SYS> alter database datafile 27 offline;
Datenbank wurde geändert.
SQL*Plus SYS> alter database datafile 27 online;
alter database datafile 27 online
FEHLER in Zeile 1:
ORA-01113: Für Datei '27' ist Media Recovery erforderlich
ORA-01110: Datendatei 27: 'C:\APP\xxxx\ORADATA\TEST\DATAFILE\T_xxx.DBF'
SQL*Plus SYS> alter database recover datafile 27 ;
Datenbank wurde geändert.
SQL*Plus SYS> alter database datafile 27 online;
Datenbank wurde geändert.
The version of the database is 11.2.0.2 and it is in ARCHIVELOG mode.
Thanks in advance!

Hello,
why must we recover a datafile after taking it offline (without restore) to take it online again:Because there's no Checkpoint when you set a Datafile OFFLINE.
However, if you set a Tablespace OFFLINE NORMAL there will be a Checkpoint, and you could set it ONLINE without Recovery.
This link may give you more details:
http://esemrick.blogspot.com/2006/03/recovery-of-offline-data-files.html
Hope this help.
Best regards,
Jean-Valentin
Edited by: Lubiez Jean-Valentin on Mar 8, 2012 3:45 PM

Similar Messages

  • Recover the Datafile without any backup

    Hi,
    I am new in oracle database.
    I have created a new database.
    database is in no archivelog mode.
    last night one of my sysaux datafile is currepted.
    is there any method to repair my sysaux datafile.
    the database is in mount mode.how can i open my db??
    Please help
    Edited by: Vaibhav Dixit on Aug 3, 2011 3:19 PM

    Vaibhav Dixit wrote:
    Hi,
    I am new in oracle database.
    I have created a new database.
    database is in no archivelog mode.
    last night one of my sysaux datafile is currepted.
    is there any method to repair my sysaux datafile.
    the database is in mount mode.how can i open my db??
    Please help
    You have already posted here so please note, always mention your o/s and 4 digit version number of the db with your post.
    Second, with no archivelog mode and no backup, you can't do the recovery . You should dump this database and recreate a new one.
    Aman....

  • Recovering a datafile from backup in different server

    Hi All,
    I usually take hot backup of datafiles to different server like this because i dont have enough space in same server. I
    SQL> alter tablespace XXXX begin backup;
    host scp /bu1/oradaTA/XXXXX/XXXXX [email protected]:/db1dw/oradata/backup/dec2010/XXXX
    alter tablespace OPS end backup;
    If i want to recover the datafile can i normally do the offline drop of that datafile and copy the datafile from backup which is in differnet server thorugh scp and make the datafile online??? and the database is in archivelog mode but i dont care abt the log files. i just need to recover the datafile as it was from last backup.
    or do we need to use any recover datafile commands?? if need to use any recover datafile command from where it will recover the datafile??
    i dont have any scripts for backup or recovery , i just take manual scp of the datafiles.
    Help plzz, thanks in advance.....

    SQL> alter tablespace XXXX begin backup;
    host scp /bu1/oradaTA/XXXXX/XXXXX [email protected]:/db1dw/oradata/backup/dec2010/XXXX
    alter tablespace OPS end backup;What is the version you are using? is it 9i if not you can peform backup at database level instead of tablespace level.
    If i want to recover the datafile can i normally do the offline drop of that datafile and copy the datafile from backup which is in differnet server thorugh scp and make the datafile online??? and the database is in archivelog mode but i dont care abt the log files. i just need to recover the datafile as it was from last backup.Why offline drop to recover? Are you sure what are you doing?
    or do we need to use any recover datafile commands?? if need to use any recover datafile command from where it will recover the datafile??1) alter system switch logfile;
    2) select max(sequence#) from v$archived_log;
    For Ex:
    Sequence -- 100
    3) alter database begin backup;
    4) copy all the datafiles to another server(bcoz you not have space in same server)
    5) alter database end backup;
    6) select max(sequence#) from v$archived_log;
    For Ex:
    Sequence -- 110
    Then copy these generated 10 archives to new server also.

  • Why do the backups do not become obsolete even if they are out of retention

    Hi,
    I'm reading 'Frequently asked questions on Rman backup retention policy [ID 463875.1]     ' and found
    >
    We can have different conditions due which the backups would not become obsolete. They are :
    1) There is an offline datafile in the database because of which the all the archivelogs or the archivelog backups needed to recover the datafile will not become obsolete.
    >
    Question is how to deal with that situation .
    I've dropped offline datafile which belongs to tablespace , so my retension policy is not working anymore .
    I dont care about that tablespace and datafile but still have to deal with them being offline every full backup .
    Regards
    GregG

    That's a problem with the iPhoto book and it's handling of the photos.  One user worked around it by arranging the photos in the order he wanted in an album and use the Photos ➙ Batch Change ➙ Date menu option to set the date of the photos sequentially so the book would list them in that order when added to a bookl.
    Send a feature request/bug report to Apple via http://www.apple.com/feedback/iphoto.html.
    OT

  • How to recover offlined datafiles

    Hi,
    While starting up the db im getting the below error
    ORA-01113: file 12 needs media recovery
    ORA-01110: data file 12:
    I checked the status of the datafiles and i found that the two datafiles(12 & 13) where in recovery mode.
    I checked the alertlog and found that
    1) Datafile 12 went offline on 13th Nov 2008
    Thu Nov 13 12:28:24 2008
    Errors in file c:\oradba\admin\bdump\db_ckpt_4528.trc:
    ORA-01171: datafile 12 going offline due to error advancing checkpoint
    ORA-01110: data file 12: '\\network drive\TAB_5.ORA'
    ORA-01115: IO error reading block from file 12 (block # 1)
    ORA-27072: skgfdisp: I/O error
    OSD-04006: ReadFile() failure, unable to read from file
    O/S-Error: (OS 6) The handle is invalid.
    2) Datafile 13 went offline on 27th Jan 2009
    Tue Jan 27 23:31:49 2009
    Errors in file c:\oradba\admin\bdump\db_ckpt_4568.trc:
    ORA-01171: datafile 13 going offline due to error advancing checkpoint
    ORA-01110: data file 13: '\\network drive\TAB_6.ORA'
    ORA-01115: IO error reading block from file 13 (block # 1)
    ORA-27072: skgfdisp: I/O error
    OSD-04006: ReadFile() failure, unable to read from file
    O/S-Error: (OS 6) The handle is invalid.
    I tried recovering datafile 12 and it is archive for archivedlogs from Nov 13, but i have archive logs only from 22nd Jan 2009.
    I can recover the datafile 13 using this archive logs.
    Can anyone tell me how to recover the datafile 12 ????
    Thanks in advance.
    Prem.

    thanks for your reply
    .>>>> I tried recovering datafile 12 and it is asking for archivedlogs from Nov 13, but i have archive logs only from 22nd Jan 2009 <<<<<
    Im having archivelogs only from 22nd jan 2009.
    Since the datafile 12 was offline from Nov 13 2008 therewont be any transactions on the datafile.
    So is there any way to bring it online and to the current SCN.
    Thanks,
    Prem

  • To Recover The Database Using a New Version of Datafile

    Please give me the solution immediately
    My one of the datafile is new and it is very important. It contains many data. I have a backup. I copy all the old files exept the new one. How i attatch the new datafile to the old database files. Now it sees the new file does not match with the old datafile and controlfile. It shows the message
    THE CONTROLFILE VERSION IS OLDER THAN THE NEW DATAFILE VERSION.
    our database version is 8.0
    How i recover

    Hi;
    Please Give a Solution for the following problem.
    First I shutdown the databae.
    Copy all the redolog,control file and Datafile except one.
    One datafile i miss at the time of copy.
    Then I start the database and do some transactions.
    At that time my system tablespace has been corrupted.
    So i copy the old backup and overwrite with the actul file.
    So one file backup is not there, that i forgot to take.
    At the time of opening the database it shows that datafile version is higher than the controlfile.
    Now what i did is came to mount stage and type the following command.
    ALTER DATABASE DATAFILE <FILENAME> OFFLINE DROP;
    After that i open the database.
    Now the problem is that missing file contain very important data.
    Is it possible to recover the data?
    Please give me an immediate solution.

  • I have lost the use of my extension pannels, and need help recovering the use. I get a message that extensions failed to load. Why?

    I have lost the use of my extension pannels, and need help recovering the use. I get a message that extensions failed to load. Why?

    I've had that before when on a really slow Internet connection.

  • Why the query of the object still can work after the datafile has been deleted?

    Dear friends:
    Recently, I deleted a datafile from OS but don't touch the correspondent tablespace in OEM(actually the datafile name still exists in OEM after I deleted it from OS). I found out I still can create objects such as table and query it in this tablespace using sqlplus though the physical datafile has already been deleted.(What I done is I created new objects using an account whose default tablespace is that one which I deleted the datafile from it.). Will these new objects use another datafile instead the original one deleted? I will appriciate if you can point out the reason for me. Thanks for your help!
    John
    07/26/2002

    Even though you delete a datafile physically from OS, entries about the datafile still exists in Data Dictionary. So long as these entries are there in data dictionary, Oracle will consider that these file exists unless there is a specific command which referes to deleted files.
    Further, you are trying to create table in a tablespace whose datafile is deleted. If that was the only datafile for that tablespace then you should get an error. If the table is getting created, there must be some other datafile for that tablespace, in which your table is getting created. This is all when your database is already in running stage. If you shutdown and restart the database, it won't start next time because of missing datafile.
    Hope this solves your query.

  • 'alter database open resetlogs' didn't reset one of the datafiles

    I've spent the last three and a half weeks recovering an oracle database (11g 64-bit linux) because of a corrupt block in an online redo log (which I thought was being written to multiple locations). I restored the files, moving some of them around in the process; recovered to the latest possible point; moved files back to their proper location; ran 'alter database open resetlogs'; and one of the datafiles (from a bigfile tablespace) didn't get reset. I checked afterward, and it was marked offline. I do not remember placing the file offline, and cannot find such a statement in my last 300 sqlplus commands, which includes commands well before I renamed this file and the commands surrounding the rename.
    Restoring/recovering the database again will take too long, and is a remarkably poor option. Even if the database had opened correctly, the affected tablespace would not have been touched in the two or three minutes the database was open. Is there any way to force oracle to reset the logs again or otherwise fix this one file to mark it with the same date? Only allowing the resetlogs option after an incomplete recovery seems a poor restriction, especially, if files can slip through like this. I'm suspecting there is someway to just fix the checkpoint values for the tablespace, but I don't know where to begin. This particular file is <5% of the database, so if I have to do some sort of backup/restore with just it, that is probably doable.

    0: 11.1.0.6.0 on SUSE Linux Enterprise Server 10 SP2
    1: rman
    backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_datafiles_%p' (database);
    backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_archivelogs_%p' archivelog all delete input;
    backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_control_%p' current controlfile spfile;
    2:
    restore database; --not sure what datafiles were restored with this
    restore datafile X; --several files were restored individually
    recover database until scn 1137554504; -- I verified that all datafiles were on the same checkpoint after this finished. Not having placed any files offline, I didn't bother checking that.
    3:
    SQL> alter database open resetlogs;
    Database altered.
    Elapsed: 00:04:20.34
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    4: Nothing in the tablespace has been touched since I ran 'alter database open resetlogs;'. It also appears that oracle placed the file offline (without me telling it to do so) and left it that way through the resetlogs, leaving the tablespace unusable during the time it was opened. The only things that would be out of date are the 'RESETLOGS_CHANGE#', the 'CHECKPOINT_CHANGE#', and associated values. It's still at the last scn before the resetlogs, and the system has been in archivelog mode the entire time. This is all information that Oracle could be tracking, and from a program logic standpoint there is no reason why Oracle cannot tie together the changes before the resetlogs, the resetlogs command and the changes after the resetlogs into a new, continuous string of changes. I assume there is some such feature in a high-caliber program because I'm actually a programmer (who would have included such advanced tracking features), and I've become a DBA out of necessity. I admit to not knowing all of the oracle DBA commands, hence me posting here before doing the work of submitting a request to metalink.
    5: I consider it a poor restriction because it doesn't always reset the logs on all files, and as far as my knowledge goes it has rendered my 3.5 week recovery process WORTHLESS. I suppose it could cause numerous errors, especially if the database wasn't cleanly shut down, but having the ability to do something equivalent to datafiles that oracle skipped the process on seems quite useful in my situation. I guess the more fundamental problem to complain about is that it would apply such changes to only some of the files, while leaving others unusable, instead of just giving me an error that some files weren't going to be reset, but I think I'm done venting my Oracle frustrations for now.
    Am I stuck with a tablespace that I cannot bring online with the database open, or is there some sort of 'alter database datafile' command (or anything else) that I know nothing of that will fix the straggling file?
    Edited by: jbo5112 on Oct 5, 2009 3:33 PM -- obfuscated some file names to secure identity.

  • Recover Database vrs Recover Tablespace & Datafile

    Traditionally when I have been recovering a database either to point of failure or point in time I have issued
    RECOVER DATABASE AUTO;
    (or I have specified the point in time I wish to recover to ).
    I see now in 11gR2 there is also a RECOVER TABLESPACE and a RECOVER DATAFILE command
    Why would you use those instead of the RECOVER DATABASE ? You would have to be pretty sure it is only that tablespace or data file you wanted to apply archive logs to, otherwise would your recovery not risk putting the contents of that tablespace or datafile out of logical sync with the data in other tablespaces ( eg potentially viloating referential integrity etc ) ?
    I am presuming these commands also only apply the contents of archive logs that effect the specified tablespace or datafile ?
    thanks,
    Jim

    If I issue a RECOVER TABLESPACE or RECOVER DATAFILE for a Tablespace or Datafile that is current and does not need recovery, Oracle does nothing to the Tablespace / Datafile. It won't be out of logical sync with the rest of the database.
    >>>
    Can you recover the data file or the tablespace to a point in time before the current time ? If that is the case then surely it is possible that the recovered tablespace could have a table in it that has referential integrity to another table in a different ( unrecovered ) tablespace and that the referential integrity could then be compromised ?
    Jim

  • Why cant the controlfile be in sync, when using backup controlfile

    hi all,
    i understand a few point ...from a dba friend of mine..
    you need a resetlog to sync the datafile headers and the controlfiles
    1) you need a resetlog when doing incomplete recovery
    2) you can recovery completely using a backup controlfile provided you have all the necessary archived logs and online redo logs.
    3) but in order not to do resetlog after 2) , you must re-create the controlfile
    my questions are
    q1) are the following point above true ?
    *q2)  why cant oracle update the controlfile when recovering using the backup controlfile ? in that case, i do not need to recreate a controlfile , isnt it ?
    Rgds,
    Noob

    user12050668 wrote:
    hi hermant,
    q1) why would i need to open the database with resetlog ?
    Yes. i am using a backup controlfile, but i have all the archived and online redologs till point of failure ?
    The purpose of a resetlog is to sync the controlfile and datafile headers , isnt it ? but i do not need to sync, as i have all the latest applied
    am i right ?
    If you use RECOVER DATABASE USING BACKUP CONTROLFILE in this case control file type is *"BACKUP"* but not *"CURRENT"* due to even you have all archivelogs and online logs you have to open database RESETLOGS statement.Actually after applying all archive and online redo logs ALTER DATABASE OPEN RESETLOGS internally sync and "Say" to control files "RECOVER FINISHED".Because CF type is BACKUP.
    q2) You need to OPEN RESETLOGS. You can choose to create controlfile OR not create controlfile (i.e. open with the backup controlfile that was used for the RECOVER).
    If you do a CREATE CONTROLFILE it has to be CREATE CONTROLFILE RESETLOGS, followed by ALTER DATABASE OPEN RESETLOGS.
    in what circumstances, would i need to re-create the controlfile when i can still use the backup controlfile ? as in any case, i would still need to resetlog.
    Rgds,
    NoobIf you have backup controlfile then do not need recreate control files.And you need use backup control file.If you lost all backup of control files and copies then or you want change database name then you can use RECREATE CONTROL FILE again.

  • Why recover after control file restore

    When we have not lost any data files but just restored the control file, why is recover command required. What does it really do for control file ?
    Does it really reads the redo logs ? I was under impression , it synchronises from the scn in datafiles . Is it correct ?
    Edited by: user11159529 on May 6, 2011 1:51 PM

    Thanks all for your respone.
    The confusion i have from 11Gr2 admin exam which has following options
    When you have lost no data files and you recover the backup control file, why is recover command required ?
    1)To roll forward changes to the control file byresynchronizing from the data files.
    2) To roll forward changes to the control file by applying redo from from the redo logs
    Notes say ANSWER 2 is correct answer
    To me it made more sense to have option 1 as correct answer. But Oracle notes say OPTION 2 is correct.
    I have having trouble following why 2 and not 1 is the correct answer.
    Thanks

  • Need to recover the db

    i had an oracle db 11g instance. somehow the db crashed and the service is no longer shown in the services list. OS is windows XP. is there any way to recover the db.
    i have the all the table spaces and the original control files
    its very urgent.
    thanks in advance for the suggestions
    vinu

    If its that much crucial than why this db is on a desktop operating system like win XP?
    Anyways, as Maran asked, do you have all the datafiles, controlfiles intact?Besides this, also check in the alert log file if there is any relevant message is there.Because even if it is recovered now, if you wont know the root cause of the issue, it may happen again.
    Aman....

  • [DATA LOSS] I closed the Tab Groups and all my tabs dissapeared. How can I recover the tabs in Firefox 26? Would you please just delete this feature?

    Thank-you in advance for reading all of this.
    A slip of the mouse in trying to return to the left-most tab caused the tab groups feature to take over the window. I completely failed to comprehend what I was looking at and closed the thing by clicking the x because I damn sure didn't want what I was looking at. Undo close group? Of course not, I didn't want a group in the first place. Hey! My tabs are completely gone now! So in just a few steps all of which seemed innocent, I have lost all but ten of the tabs that were open, and those were only the most recent ten (and actually older tabs would have been more valueable than newer so insult on top of injury).
    I don't think increasing the number of undoable tab closures is the answer. I think getting rid of the tab groups feature all together is the best way to go. I seem to have lost all the tabs I had open, irretrievably, and some of them had been open for WEEKS so they can't be reopened from history.
    The tab groups feature is a data loss bug. Please remove it from the UX completely. If you have to figure out a way to grandfather people who actually have a tab group, fine but don't further vex me with it, please.
    The reason this catastrophe has occurred is that your feature, was so discoverable that I activated it by mistake, and the UI after that had to be learned on the spot, yet was too complicated to learn. You really should withdraw it until you can figure out how to keep the UI for it from causing data loss such as I have experienced this morning.
    Also, there may be other questions on this feature which are from a certain point of view the same as this one. It's hard for me to tell for sure. None of them had a true resolution so that's why I posted this one, also I'm seeking a specific fix, removal of the offending feature.
    Why remove the feature? Because if I allow in my discussion the possibility of retaining it, it will stick around in its present and dangerous form until your team is done bikeshedding the new form it should take. Instead I want you to delete the feature and then require its champion to convince you that a new incarnation won't cause data loss before you allow it back in.
    Fellow users, if you know of a way to recover all 50 lost tabs from an "undo close tab group incident", I would be grateful for that advice, but I would still believe the feature should be deleted. Some of the tabs have been retained for months so digging them out of the history is not practical.

    I am not 100% certain but I am fairly sure development of this tab feature has ceased and it is likely to be deprecated. I am even less sure what the replacement will be.
    Thus forum is not the place for discussing development issues or feature requests. (Developers do not use this site)
    *You could comment using feedback <br /> https://input.mozilla.org/en-US/feedback
    *Or try to find a developers forum or mailing list <br /> http://www.mozilla.org/about/forums/#general-development
    I have not tried this and am not even using Windows at present but the tabs groups are stored as entries in the sessionstore.js files. Firefox has such a file plus sometimes numbered copies and a backup copy. Firefox will have re-writen these files but I suppose there is a posibility the Windows OS may have kept copies.
    * see http://windows.microsoft.com/en-US/windows7/Previous-versions-of-files-frequently-asked-questions
    * http://kb.mozillazine.org/Sessionstore.js Note the files are kept within the Firefox Profile
    ** Firefox Button -> Help -> Troubleshooting [open profile] (or some thing similar) is one method of locating the profile.
    Find and backup any current sessionstore.js file. Consider also bookmark or otherwise recording anything you have open. Now find any previous versions and try putting them in Firefox's profile before restarting it.

  • Recover the standby database

    Hi, I have both primary and standby database in ASM and I need to recover the standby database as it's falling behind for too long. The steps I did are:
    1. backup full database on primary
    2. create a standby controlfile and copy to /tmp on the standby
    3. on the standby, RMAN>restore standby controlfile from '/tmp/std.ctl';
    4. RMAN>restore database;
    5. SQL>recover managed standby database disconnect;
    However, the recovery always shuts down and I get the error:
    ORA-01110: data file 1: '+W08_DATA_DG/w08p/datafile/system.295.662256331'
    What's wrong with my steps?
    Your suggestion is greatly appreciated!

    the directory structures are the same. The standby was working before. It's just falling behind so I want to restore it from the new backup. Here is the init.ora
    *.audit_file_dest='/opt/app/oracle/admin/W08P/adump'
    *.background_dump_dest='/opt/app/oracle/admin/W08P/bdump'
    *.cluster_database_instances=2
    *.cluster_database=false
    *.compatible='10.2.0.3.0'
    *.control_files='+W08_DATA_DG/w08p/control01.ctl','+W08_RECOVERY_DG/w08p/control02.ctl','+W08_DATA_DG/w08p/control03.ctl'
    *.core_dump_dest='/opt/app/oracle/admin/W08P/cdump'
    *.db_block_size=8192
    *.db_create_file_dest='+W08_DATA_DG'
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='W08P'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=W08PXDB)'
    *.event='10298 trace name context forever, level 32'
    *.job_queue_processes=10
    *.log_archive_dest_1='LOCATION=+W08_RECOVERY_DG/W08P/'
    *.log_archive_format='%t_%s_%r.arc'
    *.log_archive_max_processes=6
    *.open_cursors=1000
    *.optimizer_index_caching=70
    *.optimizer_index_cost_adj=30
    *.pga_aggregate_target=1459617792
    *.processes=300
    *.remote_login_passwordfile='exclusive'
    *.sessions=1000
    *.sga_target=1610612736
    *.undo_management='AUTO'
    *.undo_retention=26000
    W08P.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='/opt/app/oracle/admin/W08P/udump'
    standby_archive_dest='LOCATION=+W08_RECOVERY_DG/W08P'
    CONTROL_FILE_RECORD_KEEP_TIME=0
    standby_file_management=auto
    fal_server=w08p
    fal_client=w08p_stby
    control_file_record_keep_time=90
    ~

Maybe you are looking for

  • Win vs. Mac File Paths

    I have a script that Peter Kahrel helped me with (actually he pretty much wrote the whole thing). The script saves out each page of an Indesign doc as jpeg. It also takes the text from a text box tagged "jobnumber" and inserts it into the name of the

  • Proxy to JMS Scenario: switch from sync to async proxy,does it makes sense?

    Hi @all, i've implemented a sync proxy to JMS scenario that works well. Backend is ECC 6.0 and Middleware is PI 7.1. Business Case: Run a request with a number and get a response back with a corresponding entry for the number. That means, there is al

  • Cut, copy,and paste on nokia n97

    can someone please help me. I dont know how to cut, copy,and paste on my nokia n97 6680,n70,n73,n80,n80ie,n82,n95,innov8,n85, n97, N8, lumia 920

  • Is billing doc generated without PGI

    Dear All, Encountered an unique process. Is it possible to create a billing doc without creating/doing PGI doc, but picking is done. (Though this is a Basic information to be known) Am able to save the billing doc without doing PGI, which is not supp

  • Step Type not updating properly with LabVIEW

    I have a custom steptype that reads the information from the step properties.  I also want this VI to be used as a stand alone.  So I read the sequence context handle to determine if I am running in TS or standalone.  This works fine.  Because it is