Offline datafile drop

Hello,
I had to offline and drop a datafile that was corrupted. The database can now be open. So, the database is currently open.
How do I check to see which objects that was on the datafile that I had to drop? Because a datafile was drop, which data dictionary do I check to test if an object was dependent on the datafile that I dropped? Thank you.

Clarification:
I have a test database which is not backed up and also not in archive log mode. There was an issue with a physical disk. The database crashed because of issue with on of the disks. The database was mounted with a couple of corrupted datafiles. The database was open only after 'alter datafile datafile_name offline drop. Now the database is able to OPEN status. But now I like to know which objects in the database might have dependent on the datafiles that were dropped. For example, if a table XY was in tablespace A which has 5 datafiles and one of the datafiles was dropped, would the 'status' from dba_tables say 'corrupted' for that table XY? Thank you.

Similar Messages

  • Drop offline Datafile

    Oracle Database version - 10.2.0.3
    I have a tablespace with 2 datafiles. One of the datafile is offline since couple of months. Now I am trying to drop the offline datafile but its not possible to drop that datafile.
    As its production environment I can not take the tablespace in offline mode.
    Can anyone please suggest suitable solution to drop the datafile?
    Regards,
    Sandeep

    SQL> alter tablespace AUDIT_REPORT drop datafile '/data/zus26d-0701/oracle/u04/PZHINF01/cust_idx_04.dbf';
    alter tablespace AUDIT_REPORT drop datafile '/data/zus26d-0701/oracle/u04/PZHINF01/cust_idx_04.dbf'
    ERROR at line 1:
    ORA-03264: cannot drop offline datafile of locally managed tablespace
    SQL>

  • OFFLINE datafile and Recovery

    Gurus,
    on 10Gr2, db is in archivelog mode, when I take empty datafile OFFLINE,
    then at some point in the future(full backups were performed regurarly) I need to perform
    recovery from last full backup, but archive log from the datafile OFFLINE operation way back is not available, I am not able to perform restore and recovery from full backup because of that OFFLINE datafile which needs to be recovered(why? it is offline). Is there any way to restore from the full backup and open the instance? Seems like the SET UNTIL scn/seq doesn't work either.
    Thank you
    D.

    Daniel
    I meant to ask you whether you used offline for drop or just offline command. Your posting answered my question.
    Error message says that it can not identify datafile, which means it can't find datafile for restore, either from control file or from recovery catalog depending upon what you use.
    I still don't understand issue here. Making a datafile offline should not prevent you from recovering it or restoring it.
    Are you using rman to restore ? Are you doing full database restore ? Is the restore throwing this error ? or Is the recovery throwing this error ? During backup did you use any skip option ? Sorry for numerous questions, but trying to understand the issue clearly.
    Do you have the offlined file in the file system ? If yes, you could just alter it to be online. That file shouldn't need recovery if the full backup was taken after the file was taken offline.
    Thanks
    Riyaj

  • Datafile drop

    Hi all,
    How i drop a datafile when tablespace is online ?
    thks.

    jiana wrote:
    Hi all,
    How i drop a datafile when tablespace is online ?
    thks.Its not possible before 11.1. If you would be using the command alter...datafile drop , it wont drop the datafile even if the message would be a success. Only from 11.1, if the datafile is empty, the above command would be able to drop the datafile.
    HTH
    Aman....
    Edited by: Aman.... on Sep 22, 2010 2:10 PM modified 11.2 to 11.1 after seeing the link from Saubhik.

  • Datafile Drop problem

    Hi all,
    Oracle Version: 10.2.0.1
    Os: Windows Server 2003
    Scenario: I mistakenly add datafile in a tablespace and now i want to drop that datafile but getting error
    ORA-02142: missing or invalid ALTER TABLESPACE option
    But when i try the same scenario on another machine i am able to do that
    The other machine specifications are also same.
    Command is
    SQL> ALTER TABLESPACE TABLESPACE_NAME DROP DATAFILE 'DATAFILE_NAME'
    Can anyone suggest me the reason.
    Regards,
    Vikas Kohli

    I hope that you verify that the datafile really does not contain extents.
    Else, you might find that the command drops the datafiles even with extents present, resulting in incomplete data !!
    See Oracle Support Article Bug 7022905 - Alter tablespace drop datafile drops can corrupt the database [7022905.8] and Bug 7022905.
    Hemant K Chitale

  • Can I make rman inform/fail if there are offline datafiles?

    Hi all,
    IS there any method that rman can warn we about offline datafiles(also when those files are accessible)?
    I want to make a full database backup and I want rman to warn me or make the backup failed if there are
    some offline datafiles.
    Thanks

    The easiest way to do that will be creating a script to test that condition using sqlplus before invoking the rman backup, because rman does not have an option to stop if there are offline datafiles.
    Regards.
    Edited by: ncalero on 25/11/2010 09:19 PM

  • NOARCHIVE mode and datafile DROP OFFLINE

    I have a 10gR2 database on linux that I use for testing. The db is in NOARCHIVE mode.
    I had created test tablespaces on a NAS (as opposed to the system tables on the local machine). The NAS crashed, losing the drive mapping on the db machine. Of course, I couldn't start the database due to the missing datafiles. I did an 'alter database datafile 'xxxx' drop offline', which put the datafiles in RECOVERY mode in the datafiles view.
    Amazingly, I was able to recover the NAS several days later, and the datafiles.
    Is there any way to restore them after a drop offline? When I try to online them, I get recovery needed, when I try to recover, none of the redo logs have the right checkpoint. (The checkpoint needed is less than what are in the redo logs)
    I don't care about any data that might have been lost. The data was static for months.
    Any suggestions?
    Edited by: user10822921 on Nov 4, 2009 5:03 AM

    If the database is asking for recovery when you online the files, and you don't have those transactions in the redo logs, you can't recover to a consistent point in time to online the files.
    # Note that the following is not supported by Oracle Support. You may want to ask them for a second opionion.
    You could try taking a copy of all files to another location, recreate the controlfile, and use parameter "_allow_resetlogs_corruption=TRUE" to allow "open resetlogs" to ignore the inconsistent SCN. If it works, you should be able to export the data in the copy database, drop the objects in PROD, and re-import.

  • ORA-03264: cannot drop offline datafile of locally managed tablespace

    Hi list
    A datafile was acidentally created on filesystem in one node of two nodes RAC.
    After that the filesystem on which the datafile was created was out of space because of automatic control file backup and sysadmin move this datafile to another device. And before this action RMAN backup stopped work.
    Now we replace the datafile to the original location, but it stay offline and recover status, and we cant bring them online because the customer dont have necessary archive logs to recover this datafile. RMAN backup is now working. But now we need to create a DataGuard on a third server and want to drop this datafile.
    This datafile dont have any data segment and stay in most critical tablespace of the customer application which have more datafiles. This datafile in question isnt the first datafile of the tablespace.
    SQL> select file#, status from v$datafile where name='/oracle/product/db/ars/dbs/arsystem.old';
    FILE# STATUS
    21 RECOVER
    SQL> select file#, status from v$datafile_header where name='/oracle/product/db/ars/dbs/arsystem.old';
    FILE# STATUS
    21 OFFLINE
    How can I drop this datafile?
    Thanks
    Cristiano

    Review this metalink note, what to do:
    How to 'DROP' a Datafile from a Tablespace
    Doc ID:111316.1
    If you cannot recover the datafile, you have to export the 'rest' of the tablespace (after statement 'alter database datafile '/oracle/product/db/ars/dbs/arsystem.old' offline drop;' was successfully issued). Afterwards drop the tablespace,recreate it and import the data).
    Werner

  • Datafiles Dropped at OS level.

    Hi Team,
    Please help I have dropped the datafiles at OS level. The db in not in archive log mode and we dont have backup.
    Its a UAT daatabase. ..
    Is it possible to take export and recreate and import the db if we drop the datafile..?
    Or is there any other way..?
    Thanks in advance
    Madhav

    If you don't have any backup then you can't restore.
    If you take the export then you can't get data from the dropped datafiles. So, make the datafiles offline and start up the database.
    Regards
    Asif Kabir

  • [offline datafile] how to deal with it?

    Hi,
    There is a tablespace TBS which has 4 datafiles. One datafile has offline status. This datafile is empty, I mean, it was never used. Now I want to delete this datafile. To delete it I must bring it online, but Oracle says that media recovery of this datafile is required. Media recovery can't be established becouse there is no archivelog already available. I don't know what to do with this case. I suppose I will have to export schemas that use TBS tablespace and then drop TBS tablespace and then import those schemas into a new tablespace TBS_NEW. Am I right?

    Hello,
    I suppose I will have to export schemas that use TBS tablespace and then drop TBS tablespace and then import those schemas into a new tablespace TBS_NEW. Am I right?It may depends also on the Objects stored in this Tablespace.
    For instance if you have Indexes, you can REBUILD them to another Tablespace and, if you have Tables, you may MOVE them to another Tablespace. By using ALTER INDEX REBUILD and ALTER TABLE MOVE statements you can move these Objects without dropping them.
    However, there's an exception for Table with columns using specific Datatype like LONG for instance. You cannot move them so easily and, for this kind of Tables you'll have to use export/import or Datapump utility.
    Hope this help.
    Best regards,
    Jean-Valentin

  • Tablespace/datafile drop

    version 817/ os Solaris 8
    There is request from user to take tablespace offline, and then drop this and its datafile...will i be able to startup db without issue after that?
    Edited by: DBA2011 on Mar 27, 2012 2:11 PM

    Hi,
    @Aman
    The answer is yes but how about doing it on your laptop or somewhere , shouldn't take more than 5 minutes right?:) I agree
    @Poster
    PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
    Regard
    Helios

  • Datafile drop error

    hi friends,
    I droped a datafile with following command
    alter database datafile '/abc/user1.dbf' offline drop;
    after that i deleted file from oprating system .
    I shutdown the database and restarted
    But still it is showing in datadictionary table like sysfiles,v$datafile.
    Because of this problem when i am trying to import from other database showing error
    IMP -00058 and ORA -00060 on two tables
    I saw the trace file after import ,always
    looking for '/abc/user1.dbf' which is not there in database only there in datadictionary .
    please help me out
    raj

    as far as I know, this is a know problem in oracle in some platforms ( at least pre 8.1.5 and include it, I think). The only way to drop a data file is to rebuild the tablespace that contains the data file. Otherwise, the datafile can not be dropped completely and you will (maybe) encounter some problems.
    null

  • 2 offline datafiles - problems with recovery?

    Hi, in a database there are 2 datafiles that were brought offline. They cannot be online again becouse I have no archive logs, but they are empty and not used at all. Backups are made regularly without any warnings. I wonder if there could be any problem during any future database restore or database recovery?
    Grid control show that 2 files need media recovery and severity is : X
    Edited by: 852326 on 2011-06-07 06:31

    Hi, in a database there are 2 datafiles that were brought offline. They cannot be online again becouse I have no archive logs, but they are empty and not used at all. Backups are made regularly without any warnings. I wonder if there could be any problem during any future database restore or database recovery?
    Grid control show that 2 files need media recovery and severity is : XYou can drop the datafiles with offline option, however you are sure that there is no data in that, Later perform once again FULL backup
    alter database datafile <file#> offline drop;

  • Steps to Recover OFFLINE datafile

    Dear Guru's,
    DB_VERSION-10.2.0.4
    OS_VERSION-WINDOWS 2003 SERVER
    I have noticed a datafile is offline from v$recover_file
    15:05:08 prod >@db
    NAME      OPEN_MODE  LOG_MODE     HOST_NAME
    PROD  READ WRITE ARCHIVELOG   PRODHOST
    Elapsed: 00:00:00.51
    15:05:10 prod >select * from v$recover_file;
         FILE# ONLINE  ONLINE_ ERROR                 CHANGE# TIME
            20 OFFLINE OFFLINE                    1160523233 19-JAN-12
    Elapsed: 00:00:00.06
    15:05:10 prod >select * from v$backup;
         FILE# STATUS                CHANGE# TIME
             1 NOT ACTIVE          151722179 07-JUL-09
             2 NOT ACTIVE          151722231 07-JUL-09
             3 NOT ACTIVE          151722144 07-JUL-09
             4 NOT ACTIVE          151722408 07-JUL-09
             5 NOT ACTIVE          151721658 07-JUL-09
             6 NOT ACTIVE          151721658 07-JUL-09
             7 NOT ACTIVE          151721893 07-JUL-09
             8 NOT ACTIVE          151721893 07-JUL-09
             9 NOT ACTIVE          151721893 07-JUL-09
            10 NOT ACTIVE          151721893 07-JUL-09
            11 NOT ACTIVE          151721893 07-JUL-09
            12 NOT ACTIVE          151721658 07-JUL-09
            13 NOT ACTIVE          151721658 07-JUL-09
            14 NOT ACTIVE          151721658 07-JUL-09
            15 NOT ACTIVE          151721781 07-JUL-09
            16 NOT ACTIVE          151721781 07-JUL-09
            17 NOT ACTIVE          151721781 07-JUL-09
            18 NOT ACTIVE          151721781 07-JUL-09
            19 NOT ACTIVE          151721781 07-JUL-09
            21 NOT ACTIVE          151721611 07-JUL-09
            22 NOT ACTIVE          151722063 07-JUL-09
            23 NOT ACTIVE                  0
            24 NOT ACTIVE                  0
            25 NOT ACTIVE                  0
    24 rows selected.
    Elapsed: 00:00:00.17
    15:05:10 prod >select max(sequence#) from v$archived_log;
    MAX(SEQUENCE#)
             30804Also because of which my export backup log showing following message :
    . . exporting table                            XDF
    EXP-00056: ORACLE error 376 encountered
    ORA-00376: file 20 cannot be read at this time
    ORA-01110: data file 20: 'E:\PROD\DATA\RMAN01.DBF'Kindly suggest your views in order to perform recovery.
    Edited by: user12000301 on Feb 2, 2012 1:51 AM

    Hi,
    Tried to recover data file 20 of tablespace RMAN
    RMAN> recover tablespace 'RMAN';
    Starting recover at 02-FEB-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=192 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=191 devtype=DISK
    starting media recovery
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 02/02/2012 16:29:09
    RMAN-06053: unable to perform media recovery because of missing log
    RMAN-06025: no backup of log thread 1 seq 29881 lowscn 1162657672 found to restore
    RMAN-06025: no backup of log thread 1 seq 29880 lowscn 1162614694 found to restore
    RMAN-06102: no channel to restore a backup or copy of log thread 1 seq 29879 lowscn 1162613529
    RMAN-06102: no channel to restore a backup or copy of log thread 1 seq 29878 lowscn 1162607230Also
    SQL> recover datafile 20;
    ORA-00279: change 1160523233 generated at 01/19/2012 11:53:51 needed for thread 1
    ORA-00289: suggestion : E:\ARCHIVES\PROD_1_29777_717158136.LOG
    ORA-00280: change 1160523233 for thread 1 is in sequence #29777
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00308: cannot open archived log 'E:\ARCHIVES\PROD_1_29777_717158136.LOG'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    ORA-00308: cannot open archived log 'E:\ARCHIVES\PROD_1_29777_717158136.LOG'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.The required archive is of 20-Jan-2012.Since the retention policy of the Primary is of 5 days,the archive is no longer available on the disk.
    I have also tired to find the archive on DR server's but it has deleted.
    The backup regularly goes onto the tape.
    Also this tablespace i.e. RMAN is not critical for us as we are no longer using catalog.
    Kindly suggest your views on the same.
    Thanks in advance.

  • Offline form drop down scenario

    Hi Gurus,
                   What is the best way to populate the drop downs for the Countries and its relevant cities in the Offline form scenario . For eg, if the user select the UK i need to populate the cites of the UK.

    Hi,
    You can create two tables in the interface structure like this:
    Country (0:n)
    Cities (0:n)
        Country - City
    You bind the country to a drop down box. After selecting a value, create some Java Script coding setting the values of the second drop down box (City box) like the following pattern:
    loop over the cities
      if Cities-Country == selected Country
         add the city to the city drop down box
    Using a web service will not be the best way because the client has to have access to the service. Firewall settings may cause problems in this scenario.
    Take care,
    Thomas

Maybe you are looking for