Can I Drop a datafile from UNDOTBS

Hi!!!!
I want to drop a datafile from UNDOTBS . can I Drop it.
If yes then how to drop ? what is the effect of it on database?
If anybody knows the the answer then Pls reply..

You can do this provided test it before doing it in production
Steps.
1. Create a new Undo tablespace
2. Shutdown the database
3. Change the parameter UNDO_TABLESPACE to the newly created undo tablespace
4. Start the database
5. Do whatever you want with the old undo tablespace.

Similar Messages

  • Drop one datafile from Tablespace

    Hi,
    I have 9i Database on Linux. I want to drop one datafile from tablespace. I have tried to drop datafile through following command but it gave no effect.
    alter database datafile <datafile name> offline drop;
    What should i have to do for dropping datafile?
    Do the needful
    Thankx in advance.

    Hi
    since you dont specify the database version or if you have it setup as archivelog or noarchivelog mode, i paste the drop specs for dropping a datafile, from SQL Reference manual of 9i
    DROP If the database is in NOARCHIVELOG mode, you must specify the DROP
    clause to take a datafile offline. However, the DROP clause does not remove the
    datafile from the database. To do that, you must drop the tablespace in which the
    datafile resides. Until you do so, the datafile remains in the data dictionary with the
    status RECOVER or OFFLINE.
    If the database is in ARCHIVELOG mode, Oracle ignores the DROP keyword.
    Regards
    Message was edited by:
    pcambra

  • Drop a datafile from physical standby's control file

    Hi,
    I am trying to create a physical standby database for my production...
    1) I have taken cold backup of my primary database on 18-Nov-2013...
    2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
    3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database...
    When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
    SQL> recover standby database;
    ORA-00283: recovery session canceled due to errors
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    How to overcome this situation...
    Can i delete the entry for the newly added datafile from the backup control file ?
    When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be  open..
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      AUTO
    SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
    System altered.
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      MANUAL
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    Regards,
    Jibu

    Jibu wrote:
    Hi,
    I am trying to create a physical standby database for my production...
    1) I have taken cold backup of my primary database on 18-Nov-2013...
    2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
    3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database..
    Hi,
    What is your version?
    If you added new datafile or created new tablespace, take backup again for restore new created standby database.
    If your standby  database running well, DG configuration success, then this datafile will create on standby side, too.
    Set STANDBY_FILE_MANAGEMENT=AUTO best practice.
    When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
    SQL> recover standby database;
    ORA-00283: recovery session canceled due to errors
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
    ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    How to overcome this situation...
    Can i delete the entry for the newly added datafile from the backup control file ?
    Not need any delete datafile from standby side, you must recreate standby database, or you can  take RMAN backup and restore to standby  side again.
    When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be  open..
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      AUTO
    SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
    System altered.
    SQL> show parameter STANDBY_FILE_MANAGEMENT
    NAME                                 TYPE        VALUE
    standby_file_management              string      MANUAL
    SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
    ERROR at line 1:
    ORA-01109: database not open
    It is not logical, Physical  standby must be bit-for-bit same with Primary  database.
    Regards
    Mahir M. Quluzade

  • Can i use one datafile from different database to my database ?

    hi,
    i copied one datafile from development server to my database ? how can i use this datafile
    can i re-create controlfile , please suggest?
    Edited by: 819136 on Jan 12, 2011 2:45 AM

    I have create the controlfile please find the below details
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1298160 bytes
    Variable Size 255852816 bytes
    Database Buffers 348127232 bytes
    Redo Buffers 7090176 bytes
    SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
    2 MAXLOGFILES 5
    3 MAXLOGMEMBERS 3
    4 MAXDATAFILES 14
    5 MAXINSTANCES 1
    6 MAXLOGHISTORY 226
    7 LOGFILE
    8 GROUP 1 'E:\ORACLE\ORADATA\ORCL\REDO01.LOG' SIZE 100M,
    9 GROUP 2 'E:\ORACLE\ORADATA\ORCL\REDO02.LOG' SIZE 100M,
    10 GROUP 3 'E:\ORACLE\ORADATA\ORCL\REDO03.LOG' SIZE 100M
    11 DATAFILE
    12 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF',
    13 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF',
    14 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF',
    15 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF',
    16 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF',
    17 *'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEST01.DBF'*
    18 CHARACTER SET WE8MSWIN1252;
    CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01159: file is not from same database as previous files - wrong database id
    ORA-01110: data file 43: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEST01.DBF'
    SQL>
    SQL> ALTER DATABASE OPEN RESETLOGS;
    ALTER DATABASE OPEN RESETLOGS
    ERROR at line 1:
    ORA-01507: database not mounted

  • Can I drop my HDD from my C2D MBP straight into an i5 MBP?

    I've got a MBP Core2Duo 2.26. I upgraded the drive in it myself to a 7200rpm 500gb Western Digital. It's running 10.6.6.
    I'm getting a 2011 i5 MBP next week with a 320gb drive. Can I just drop the HDD from my old MBP into the new one?
    Obviously my 'old' drive is bigger, is 7200rpm and has all of my data on it.
    So is this possible without having to reinstall snow leopard etc? Will it just work?

    Not without installing OS X. The OS on the new machine will be a different build. Your system will not fully work with the new machine unless the new machine comes with 10.6.5 or earlier installed.

  • Drop a datafile that is offline and not on the OS

    I am running a 2 node rac on ASM . 10gR2 on HP UX.
    By mistake 1 datafile has been deleted on the OS , and that datafile is marked as offline in the dba_data_files.
    How can I drop the datafile from the database.
    since when I query the dba_data_files the datafile 10 ( which was deleted on OS ) , shows its still present and online_status is offline.
    The datafile is not required and also there is no backup for the datafile.
    Thanks

    Hi,
    ALTER DATABASE DATAFILE '<full file spec>' OFFLINE DROP;
    example: just give '+dg1/../../..' if it not exists also give the same
    Kind Regards,
    Rakesh Jayappa

  • Dropping a datafile

    Can we drop one datafile from a tablspace?
    I have a tablespace TS1 which has 3 datafiles.i made one datafile offline and trying to drop that particular datafile....is it possible ?
    SQL> alter database datafile 'E:\ORACLE\ORADATA\TESTDB\KISH1.DBF' DROP;
    alter database datafile 'E:\ORACLE\ORADATA\TESTDB\KISH1.DBF' DROP
    ERROR at line 1:
    ORA-01916: keyword ONLINE, OFFLINE, RESIZE, AUTOEXTEND or END/DROP expected
    the errror is we are not giving the right option but Oracle itself is suggesting a DROP option...CAN ANYONE HELPME OUT
    THANKS

    I have tried this. If the tablespace contains objects, when you issue command
    alter tablespace <tablespace_name> drop datafile <datafile_name>;
    you will get ORA-03263
    If the tablespace is empty, you can drop the second datafile.
    It doesn't make sense to me to drop one of the datafile. You can drop the entire tablespace with "including contents and datafiles" and create another tablespace. I rarely got the situation to drop one of the datafile.

  • 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

  • Droping a datafile from a tablespace

    I want to drop a datafile from a tablespace by using the query
    SQL> alter tablespace TS1 drop datafile 'OS path\df1';
    This query drops the datafile. But physically the datafile is present in the OS path. how to delete the datafile completely from the disk.

    Version:-
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    Although it's dropped on database level, I can't delete.If dropped data file from ORACLE, it deletes from OS level too. By any other processes being locked like antivirus and so on?
    SQL> select file_name from dba_data_files where tablespace_name='USERS';
    FILE_NAME
    C:\ORACLE\ORADATA\ORCL\USERS01.DBF
    C:\ORACLE\ORADATA\ORCL\USERS02.DBF
    SQL> alter tablespace users add datafile 'c:\oracle\oradata\orcl\users03.dbf' size 10m;
    Tablespace altered.
    SQL> host
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\bn2676>cd c:\Oracle\oradata\orcl
    c:\Oracle\oradata\orcl>dir users*
    Volume in drive C is System
    Volume Serial Number is 1853-3E21
    Directory of c:\Oracle\oradata\orcl
    02/15/2012  11:25 PM         5,251,072 USERS01.DBF
    02/16/2012  09:04 PM        10,493,952 USERS02.DBF
    02/16/2012  09:05 PM        10,493,952 USERS03.DBF
                   3 File(s)     26,238,976 bytes
                   0 Dir(s)  177,196,707,840 bytes free
    c:\Oracle\oradata\orcl>exit
    SQL> alter tablespace users drop datafile 'c:\oracle\oradata\orcl\users03.dbf';
    Tablespace altered.
    SQL> select file_name from dba_data_files where tablespace_name='USERS';
    FILE_NAME
    C:\ORACLE\ORADATA\ORCL\USERS01.DBF
    C:\ORACLE\ORADATA\ORCL\USERS02.DBF
    SQL> host
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\bn2676>cd c:\Oracle\oradata\orcl\
    c:\Oracle\oradata\orcl>dir user*
    Volume in drive C is System
    Volume Serial Number is 1853-3E21
    Directory of c:\Oracle\oradata\orcl
    02/15/2012  11:25 PM         5,251,072 USERS01.DBF
    02/16/2012  09:04 PM        10,493,952 USERS02.DBF
                   2 File(s)     15,745,024 bytes
                   0 Dir(s)  177,207,398,400 bytes free
    c:\Oracle\oradata\orcl>

  • Remove datafile from database

    Hello all,
    I have a database 11.1.0.7 where I wanted to remove a datafile. The database is in archivelog.
    The first thing that I did was to make sure that no data was in the datafile. - OK
    Then, since I only wanted to remove 1 week later, I put the datafile offline - OK
    On the day (one week after putting it offline) that I was going to remove/drop the datafile from the tablespace I got an ORA- saying to put the datafile online before dropping.
    And here is my problem! The database says that the datafile needs recover :(
    Questions:
    1- If the datafile was offline, why does it need recover?
    2- Do you thing that the database will ask for all archivelogs until now to recover this datafile ?
    3- If I dont want to apply all archivelogs, can I simply remove the datafile by recreating the controlfile without this datafile?
    Thank you.

    Questions:
    1- If the datafile was offline, why does it need recover?The SCN must be alligned with the DB
    2- Do you thing that the database will ask for all archivelogs until now to recover this datafile ?I never tried that with missing archived logs so I cannot say it. Just try and you will see.
    3- If I dont want to apply all archivelogs, can I simply remove the datafile by recreating the controlfile without this datafile?The problem is that this datafile is registered in the dictionary. You cannot do it.
    Probably you got this exception:
    ORA-03264: cannot drop offline datafile of locally managed tablespace
    Cause: Trying to drop offline datafile in lmts
    Action: Try to drop file after making it onlinehttp://download.oracle.com/docs/cd/B28359_01/server.111/b28310/dfiles006.htm#ADMIN11435
    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.

  • Drop one datafile

    Hi,
    I have 5 datafile in one tablespace. If i want to drop perticular one datafile from the tablespace can you please suggest me some command to do this activity.
    Thank You

    Hi,
    My database version is 9i on Linux and this database in No archivelog mode.
    Is it possible to drop one datafile from one Tablespace.
    Thankx in advance.

  • Can i exclude data file from recovery

    Hi
    i am on 8.1.7.4
    i had a test offline datafile which causes problem when i restore recover my db
    i restored my db
    recover it , but i am missing an archivelog , which prevent me from recovery of the whole of my db
    i can't open resetlogs;
    can i exclude this datafile from recovery , or deleted completely
    i tried alter database datafile 81 offline;
    but still the db feels it needs to rcover it
    Thanks

    Hi,
    Its not like to try one by one command, do you check what the errors he have post?
    SQL> Alter database open resetlogs;
    Alter database open resetlogs
    ERROR at line 1:
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: 'F:\ORADATA\DB\TCOR_SYSTEM_01.DBF'
    SQL> user,
    can you check these two views?
    select file#, status, checkpoint_change# from v$datafile;
    select file#, status, fuzzy, checkpoint_change# from v$datafile_header;Then we can find which one is new one which one is old?
    Thanks.

  • Can't drop UNDOTBS datafile and tablespace

    The datafile is already offline but i still can't drop either that or the entire UNDOTBS tablespace.
    Please help!

    Hi,
    the answer gives by mr stevencallan is right.
    first create new undo tablespace for ur instance and then assign this undo tablespace by
    alter system set undo_tablespace=<undo_tb name> scope=both;
    later u drop ur old undo tablespace.
    no need of any shutdown inthis scenario.
    Thanks and Regards
    Kuljeet Pal Singh

  • Need to drop datafile from my undo tablespace

    I have a undo tablespace and it has 2 datafiles. i would like to drop one datafile.
    befor i am droping this datafile i am going to bring this file to offline and i got this message: ORA--01145 offline immediate disallowed unless media recovery enable.
    can someone tell me how i can safly do it without any problem.
    Thanks

    An undo tablespace can be dropped like any other tablespace, but not until all transactions within the tablespace are complete. First, specify a new undo tablespace as in the previous example. To see if the tablespace has any pending transactions, run the following query:
    SQL> select rn.name, rs.status
    2 from v$rollname rn, v$rollstat rs
    3 where rn.name in
    4 (select segment_name from dba_segments
    5 where tablespace_name = 'UNDOTBS')
    6 and rn.usn = rs.usn
    7 ;

  • Recover from dropped SYSAUX datafile

    Trying to recover a DEV database without rebuilding it, but not hopeful at this point. Basically, someone dropped the SYSAUX (and a few other) datafiles, so now they are showing up in the database as MISSING0003 instead of the actual filename. There are no backups, but I want to drop the tablespaces (not SYSAUX) and in trying to do so, I'm getting an error about the SYSAUX tablespace for some reason. How can I rebuild or recover from the SYSAUX issue, since I cannot drop the SYSAUX tablespace, as it seems to be preventing me from dropping any of the other tablespaces that have missing datafiles as well. I really just need to recreate the tablespaces, but get the below error when I try to drop the schemas (with cascade) or the tablespaces (including contents).
    SQL> drop tablespace DATA001 including contents;
    drop tablespace DATA001 including contents
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 2
    ORA-00376: file 3 cannot be read at this time
    ORA-01111: name for data file 3 is unknown - rename to correct file
    ORA-01110: data file 3: 'C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\MISSING00003'
    ORA-06512: at line 19
    Any help to get past the first issue of dropping the non-SYSTEM tablespaces would be great, and any follow-up on how to rebuild/recreate/recover from the dropped SYSAUX datafiles would be appreciated as well.
    DB is 10gR2 on Windows.

    user4257171 wrote:
    Trying to recover a DEV database without rebuilding it, but not hopeful at this point. Basically, someone dropped the SYSAUX (and a few other) datafiles, so now they are showing up in the database as MISSING0003 instead of the actual filename. There are no backups,
    > DB is 10gR2 on Windows.
    Without backups you are not going to be able recover the dropped data files. Given that one of the tablespaces was the required SYSAUX tablespace you are most likely looking at a rebuild instead of a restore.

Maybe you are looking for

  • Office 2013 license pack does not allow me to activate key within configuration wizard

    Hello,  I have a KMS host running Office 2010 activations for our client computers which is running fine. I installed the Office 2013 license pack on the same host. However, in the configuration wizard it doesn't allow me to activate the product key.

  • Question about the index and homepages

    Hello all, I am new to dreamweaver and I have only had my website for a couple of months now. On my site, I have a "Home Page" button that visitors can click to return to the home URL. My home URL is: www.djidblends.com When users click on the "Home

  • How do I maximize the chance of a successful p2p connection?

    I understand that the p2p connection may not be possible, and sometimes even the stratus connection may not be possible, but I would like to know any steps I can take to help improve the probability of success. Are there any recommendations on guidel

  • Saplicense -install not working

    Hello, I have restored PRD backup on DEV server but now not able to login due to license error. Its ECC 6.0 inst on AIX with Oracle Database. Error is --- isrdserver:devadm 51> saplicense -install ifile=/sapmnt/DEV/license ERROR: data in file /sapmnt

  • LaserJet P1102w setup 2 printers on different routers problem

    We have two offices, we have a HP laserjet P1102w in each office on wireless. I have been able to setup a laptop to either of the printers but if I try to setup the second printer (on a different router) it totally screws up the setup of the first pr