Deleted undo datafile before dropping the tablespace.

i had accidently deleted a undo datafile which was no more needed before dropping the tablespace.
i started up the database in mount stage by making that datafile offline.
now while dropping the database it is giving an error.
SQL> drop tablespace UNDOTBS1 ;
drop tablespace UNDOTBS1
ERROR at line 1:
ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping tablespace
Do someone have a resolution. I dnt need this tablespace anymore.

http://www.my-whiteboard.com/oracle-dba/how-to-drop-and-recreate-oracle-undo-tablespace-and-its-data-files.html may be helpful to you.

Similar Messages

  • Automatic deleting of datafiles after DROP TABLESPACE

    Lazy junior dba question. How can i order oracle to delete files automaticly after deleting them from control file (like drop tablespace command)?
    What technology/approach should I use? Can ASM help me?
    Thnaks.

    Well, ideally after issuing
    DROP TABLESPACE <TBS_NAME> INCLUDING CONTENTS AND DATAFILES; the datafiles corresponding to that tablespace should get deleted automatically. Although, in my case, sometimes it gets deleted automatically, but sometimes it doesn't(Windows Server).
    Comments from others will be useful.
    Regards,
    Anand

  • Delete with extent returning to the tablespace

    When I delete all the rows from the table I can use:
    'truncate table mytable drop storage'
    and the extents are returned to the tablespace that table resides in.
    Is something like this possible with the delete statement? If not - or if I just didn't use it - when the delete makes many extents empty, does Oracle automatically reclaim them?
    Thx.

    >>
    when the delete makes many extents empty, does Oracle automatically reclaim them?
    <<
    Inserts into the table can and will refill the empty blocks given enough activity and over time but even if every block in an extent is empty Oracle does not release the extent back to the tablespace as freespace at least through 10g.
    If you need to release the extents to the tablepsace for reuse due to space requirements then you would need to reorganize the table and its indexes. The alter table move statement can be used if enough free space exists in the tablespace to support the operation or exp/truncate/imp ignore=y can be used.
    The question is how much space would be freed? How badly do you need it for other objects? And how long before the table would need to re-extend if you take the space away (or how long before the table would reuse the extents)?
    You do not want to perform reorganizations just to do them. There needs to be a real benefit to yourself or your application from the work.
    HTH -- Mark D Powell --

  • My iPad 2 touch screen will not work. The screen is currently locked. The sliders work, but the number pad doesn't! My screen was shattered months ago, and worked fine until recently. I need to delete confidential info before replacing the glass. HELP!

    Again, everything worked perfectly until about two days ago. Out of nowhere, the numbers on the unlock screen stopped working. The sliders still work, the photo button still works. I've tried reseting it multiple times, and powering it off multiple times as well! Any help would be very helpful. It needs to be fixed as soon as possible for a private buyer. Thank you!!

    Have a read at all this, including the links. I personally would then proceed in this order.
    Open iTunes on your computer. Connect your device (iPad or whatever) to the computer.  Hold both home and power buttons for exactly 10 seconds, release the power button, keep holding home button until your device recognises it is in Recovery Mode. (Perhaps 10-20 seconds.) If the device screen is black (blank) then it is in DFU Mode.
    See this link and note the sentence commencing, 'If you restore from a different computer.... ' down near the bottom of the page.
    http://support.apple.com/kb/HT1808
    Unresponsive iPads
    http://support.apple.com/kb/TS3281
    http://www.youtube.com/watch?v=OXlY-VcxbCU&feature=youtu.be

  • Restoring only the tablespace from the database

    How do we restore only a 'tablespace' from a Terabyte database without restoring the entire database.
    ie... if a particular tablespace has been dropped from the database and we have the backup available for the database.
    So, how do we go about it for restoring only that tablespace.
    Version:10.2.0.4
    OS : solaris 10
    Edited by: user13364377 on Sep 29, 2010 3:49 AM
    Edited by: user13364377 on Sep 29, 2010 3:51 AM

    If you have a RMAN backup before dropping the tablespace then we can restore the tablespace by below method
    It is a tablespace point in time recovery ,here we need to create a auxillary DB.
    Recover a table/tablespace from Rman backup on same server:
    ===============================================
    Here we have to create the auxillary database.
    1.u should have valid backup of the database before dropping the tablespace.
    2.create the password file of target database.
    orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
    3.Take backup of the control file to trace for creating the new control file for new
    auxillary database/
    SQL> alter database backup controlfile to trace;
    sample control file:
    STARTUP NOMOUNT
    CREATE CONTROLFILE SET DATABASE "aux1" RESETLOGS FORCE LOGGING ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 454
    LOGFILE
    GROUP 1 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO01.LOG' SIZE 10M,//make sure here to change the location of of redo
    GROUP 2 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO02.LOG' SIZE 10M, logs to new location or change the location name before
    GROUP 3 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO03.LOG' SIZE 10M //starating the database at the end.
    -- STANDBY LOGFILE
    DATAFILE
    'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSTEM01.DBF',
    'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\UNDOTBS01.DBF',
    'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSAUX01.DBF',
    'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS01.DBF',
    'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS02.DBF'
    CHARACTER SET WE8MSWIN1252
    4.create the password file of auxillary database.
    orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
    5.create the control file
    sqlplus "/as sysdba"
    SQL>@create.sql
    6 catalog all the backuppiece to the newly created database;
    catalog backuppiece 'D:\oracle\product\10.1.0\LOG_707656915_50P1';
    7.We have to restore system,sysaux,undo and the tablespace which was dropped
    run
    set newname for datafile 1 to 'D:\oracle\product\10.1.0\oradata\aux1\system01.dbf';
    set newname for datafile 2 to 'D:\oracle\product\10.1.0\oradata\aux1\undotbs01.dbf';
    set newname for datafile 5 to 'D:\oracle\product\10.1.0\oradata\aux1\users02.dbf';
    set newname for datafile 3 to 'D:\oracle\product\10.1.0\oradata\aux1\sysaux01.dbf';
    set newname for datafile 4 to 'D:\oracle\product\10.1.0\oradata\aux1\users01.dbf';
    restore tablespace SYSTEM;
    restore tablespace UNDOTBS1;
    restore tablespace users;
    restore tablespace sysaux;
    switch datafile all;
    8.Take the other tablespace offline
    sqlplus>alter tablespace tablespace_name offline drop;
    9.recover the database prior to the time when tha table/tablespace was dropped.
    RMAN> run{
    2> set until time "to_date('07-01-2010 14:00:00','dd-mm-yyyy hh24:mi:ss')";
    3> recover database;
    4> }
    10.open the database in resetlog mode.
    take a transpotable tablespace backup of that tablespace and import it on the database where you dropped it.

  • Dropping the 4th undo tablespace, 4th thread from a 3 instance database

    I migrated a 4 instance RAC database from a 4 node server to a 3 node RAC database server. However, I still have the 4th undo tablespace and the 4th redo log thread. Are there any precautions I need to take before dropping the 4th undo tablespace? Must I also drop the 4th redo log thread, or will the database function properly even without a 4th node to go with the 4th thread?
    I presume I have to also disable the 4th public thread? Is this the command below?
    Alter database disable public thread=4;

    I guess it does not matter that group 12 in thread 4 is "CURRENT" since the thread is not being used. But I don't believe I can drop a "CURRENT" group, can I?
    SQL> select group#, thread#, bytes, members, status from v$log;
        GROUP#    THREAD#      BYTES    MEMBERS STATUS
             1          1   52428800          2 CURRENT
             2          1   52428800          2 INACTIVE
             3          1   52428800          2 INACTIVE
             4          2  104857600          2 INACTIVE
             5          2  104857600          2 INACTIVE
             6          2  104857600          2 CURRENT
             7          3   52428800          2 INACTIVE
             8          3   52428800          2 INACTIVE
             9          3   52428800          2 CURRENT
            10          4   52428800          2 INACTIVE
            11          4   52428800          2 INACTIVE
            12          4   52428800          2 CURRENT
    12 rows selected.

  • 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

  • How can i drop datafile when drop tablespace?

    I use oo4o.
    null

    Xiaoer (guest) wrote:
    : I use oo4o.
    As far as Oracle is concerned, a datafile is no longer
    accessible if it's no longer assigned to a tablespace. To
    physically remove the datafile, you should use your OS. Just
    make sure you:
    1) Really have dropped the tablespace
    2) You delete the correct datafile - anything with 'SYS' in
    the title is probably a bad idea!
    null

  • Drop datafile from a offline tablespace

    We are running oracle 9.2 on windows.
    Out of the 3 datafiles in a non-system tablespace A, one datafile A-DF1 was accidently droped from the file system by our DBA.
    The other two datafiles were brought online by using the ALTER DATABASE RECOVER command by bringning the database in mount phase.
    Now we want to remove that datafile A-DF1 from the tablespace and bring that tablespace online.
    The database is not in archive mode and no cold backup was present.
    The solution that we want to try is:
    1-drop the tablespace A without dropping the datafiles
    2-create a new tablespace and reuse those datafiles
    3-assign this new tablespace to the affected user
    Would this work? Do you have any other safe solution for this problem?
    thanks
    Imran

    Hi..
    Your solution is a wrong solution.
    1. I guess, that the tablespace A won't be a empty tablespace.As, the objects are present in the tablespace you can't drop the tablespace without dropping its contents.You will have to use *DROP TABLESPACE <tbs_name> INCLUDING CONTENTS; -- This will drop all the contents.
    2. Do, you have a export backup, or any kind of backup.As the database is in no archivelog mode, you won't be able to do complete recovery.
    3. Take the datafile A-DF1 OFFLINE and keep the tablespace online. -- alter database datafile 'datafile_name' offline;
    If you don't have any kind of backup, the data is LOST.
    Anand

  • Drop a tablespace and datafile when database is mounted

    I tried to import data in my oracle 11g. It failed midway. I presumed that i did not size the redolog properly. Now my database cannot go beyound the mounted mode.
    ORA-01157: cannot identify/lock data file 7 – see DBWR trace file
    ORA-01110: data file 7: ‘ /data1/owprojects/xxxxx.dbf ‘
    Its a new oracle installation and i do not need the corrupt datafile.
    I cant take the tablespace offline neither can i drop the tablespace including its contents.
    Do i drop from the Linux OS. If yes which other file to i edit to remove the pointer to this tablespace.
    Thanks and Best Regards
    J

    Try:
    alter database datafile 7 offline for drop;Example:
    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area 1071333376 bytes
    Fixed Size                  1388352 bytes
    Variable Size             658505920 bytes
    Database Buffers          406847488 bytes
    Redo Buffers                4591616 bytes
    Database mounted.
    SQL>
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
    ORA-01110: data file 5: 'C:\TEMP\TEST01.DBF'
    SQL> alter database datafile 5 offline for drop;
    Database altered.
    SQL> alter database open;
    Database altered.
    SQL> archive log list;
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     396
    Next log sequence to archive   397
    Current log sequence           397
    SQL> alter tablespace test drop datafile 5;
    alter tablespace test drop datafile 5
    ERROR at line 1:
    ORA-03261: the tablespace TEST has only one file
    SQL> drop tablespace test;
    Tablespace dropped.
    SQL>Please read http://docs.oracle.com/cd/E11882_01/server.112/e25494/dfiles004.htm#ADMIN11428.
    Edited by: P. Forstmann on 19 mars 2012 18:53

  • How to drop the datafile?

    Hello Everybody
    is it possible to drop the datafile? i have run the query ALTER DATABASE DATAFILE 'c:\oracle\oracle_db\m300\user\user01.dbf' offline drop. After i checked with DBA_DATA_FILES its there.Can any one help in this regards
    Regards
    Hameed

    Please see this link:
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14231/dfiles.htm#i1006556
    Restrictions for Dropping Datafiles
    The following are restrictions for dropping datafiles and tempfiles:
    The database must be open.
    If a datafile is not empty, it cannot be dropped.
    If you must remove a datafile that is not empty and that cannot be made empty by dropping schema objects, you must drop the tablespace that contains the datafile.
    You cannot drop the first or only datafile in a tablespace.
    This means that DROP DATAFILE cannot be used with a bigfile tablespace.
    You cannot drop datafiles in a read-only tablespace.
    You cannot drop datafiles in the SYSTEM tablespace.
    If a datafile in a locally managed tablespace is offline, it cannot be dropped.
    Regards

  • How to know when the tablespace was deleted?

    Hi
    can we find the information regarding which has been deleted.
    can we find that when it was deleted.
    can we find who deleted it?
    Thanks
    Shaikh

    Hi,
    Just for Example :-
    If you have given the access rights for two Users, who have the privi's to drop the tablespaces...and think you dont have the Option of Alert Log.
    what you would do..??
    Auditing...??
    Tracing.. ??
    I think better Option is Trace for Specific Session, which ever he is willing to you.
    How does that help in this scenario and otherwise also ? No one is gonna enable trace like this for the users.
    Let me know your valuable feed back, that might help me in correcting my mistakes..!! ';-)
    Thanks
    Pavan Kumar N

  • Dropping a tablespace

    Hi ,
    DB version is 10.2.0.4 . Trying to drop tablespace it throws error as
    SQL> drop tablespace APPS_TS_SUMMARY including contents and datafiles;
    drop tablespace APPS_TS_SUMMARY including contents and datafiles
    ERROR at line 1:
    ORA-23515: materialized views and/or their indices exist in the tablespace
    SQL> !oerr ora 23515
    23515, 00000, "materialized views and/or their indices exist in the tablespace"
    // *Cause:  An attempt was made to drop a tablespace which contains
    //          materialized views and/or their indices.
    // *Action: Drop the materialized views in this tablespace. Also,
    //          find indices belonging to materialized views in this
    //          tablespace and drop then.  Then try dropping the tablespace.
    //So dropped the MV in the tablespace using,
    select 'drop materialized view '||owner||'.'||name||' ;' from dba_registered_snapshots where name in (select table_name from dba_tables where tablespace_name='APPS_TS_SUMMARY');Then too it showed the same error. How do i drop this tablespace?
    baskar.l

    select ‘drop materialized view ‘||owner||’.'||name||’ PRESERVE TABLE;’ from dba_registered_snapshots where name in  (select table_name from dba_tables where tablespace_name = ‘your_tablespace_name’);use this command to generate command , and use this commands to delete your m view on this tablespace
    and delete constraints also
    drop tablespace your_tablespace_name  including contents and datafiles CASCADE CONSTRAINTS;Edited by: Adigozalov Gurban on Jan 23, 2011 6:15 PM

  • How to drop users tablespace

    Hey to all
         I want to drop USER tablespace wid data file but as we know many oracle users Scott OE data reside in users. How can I protect their data. One method which I read on net to export and import once again is quite cumbersome I run this query
    SELECT
    owner
    , segment_name
    , segment_type
    FROM
    dba_segments
    WHERE
    tablespace_name='USERS'
    it give me two user OE and SCOTT. How can I protect their data before drop the user tablespace

    Hi..
    As you said direct load takes place, then the rows which are inserted are always inserted above the HWM.So the datafile size size kept on increasing.
    i read about segment advisor i run the advisor it shrink the segment but users tablespace size on OS still 200 GB could anyone tell why??You would have run alter table <table_name> shrink space; -- This statement will procede in two steps:
    - The first step makes the segment compact by moving rows further down to free blocks at the beginning of the segment.
    - The second step adjusts the high watermark. For this Oracle needs an exclusive table lock,but for a very short moment only.
    The HWM goes below, and table are now more well organized.This command doesn't resize the datafile at the OS level.So, the datafile sizes will remain the same.One thing which you can do is resize(decrease) the datafile.
    MINIMUM DATAFILE SIZE
    COLUMN block_size NEW_VALUE v_block_size
    SELECT TO_NUMBER(value) AS block_size
    FROM   v$parameter
    WHERE  name = 'db_block_size';
    COLUMN tablespace_name FORMAT A20
    COLUMN file_name FORMAT A50
    COLUMN current_bytes FORMAT 999999999999999
    COLUMN shrink_by_bytes FORMAT 999999999999999
    COLUMN resize_to_bytes FORMAT 999999999999999
    SET VERIFY OFF
    SET LINESIZE 200
    SELECT a.tablespace_name,
           a.file_name,
           a.bytes/1024/1024 AS current_MB,
           (a.bytes - b.resize_to)/1024/1024 AS shrink_by_MB,
           b.resize_to/1024/1024 AS resize_to_MB
    FROM   dba_data_files a,
           (SELECT file_id, MAX((block_id+blocks-1)*&v_block_size) AS resize_to
            FROM   dba_extents
            GROUP by file_id) b
    WHERE  a.file_id = b.file_id
    ORDER BY a.tablespace_name, a.file_name;Edited by: Anand... on Feb 17, 2009 12:01 PM

  • Why I got error ORA-02429 when I tried to drop a tablespace?

    I use the following command to drop the tablespace:
    drop tablespace users including contents and datafiles;The error message is below:
    Error report:
    SQL Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-02429: cannot drop index used for enforcement of unique/primary key
    00604. 00000 -  "error occurred at recursive SQL level %s"
    *Cause:    An error occurred while processing a recursive SQL statement
               (a statement applying to internal dictionary tables).
    *Action:   If the situation described in the next error on the stack
               can be corrected, do so; otherwise contact Oracle Support.However, I have removed all the tables and indexes in this tablespace.
    Nothing found when I issued the following enquiries.
    select index_name from user_indexes where TABLESPACE_NAME = 'USERS';
    select table_name from user_tables where TABLESPACE_NAME = 'USERS';Is there anything I missed?
    Thanks in advance.

    999274 wrote:
    Could you please let me know how to purge recyclebin ?It's bad form to hijack someone else's thread for your own questions.
    As for your question
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to [url tahiti.oracle.com]tahiti.oracle.com.
    Locate the link for your Oracle product and version, and click on it.
    You are now at the entire documentation set for your selected Oracle product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

Maybe you are looking for