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

Similar Messages

  • How to drop the datafile in a tablespace

    hi,
    I need to drop the datafile in a tablespace.How to drop the datafile in the tablespace.If iam able to drop the datafile and is it possible to create the datafiles with the same name.could u pls help me out..
    Thanks in advance,
    R.Ratheesh

    sql > alter database <datafile> offline drop ;
    sql > alter database open ;What if the datafile have the segments in it, I believe users will not be able to access them. And system will put the datafile to Recovry mode not drop it.
    Dropping a datafle is possible only in 10G. In 9i you can reduce the size of file below the size of your min extents so that the space wont be allocated from that datafile or you may need to recreate a new tablespace copy all the segments from old tablespace and drop old one.
    Cheers

  • How to drop the multi columns?????

    how to drop the multi columns in oracle
    Like
    alter table drop column a,b;
    is it possible.

    how to drop the multi columns in oracle
    Like
    alter table drop column a,b;
    is it possible.Yes, it is possible.
    RTFM:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2124702
    pratz

  • How to defragment the datafile hwm in EBS R12 database

    Hi All,
    We are on 1204 E-biziness instance on 11gR2 database.
    We have deleted(purged some EGO data and got the huge space in dba_segments. it was around 2.5 gb after purging activity we got
    SQL> select sum(bytes/1024/1024/1024) from dba_segments;
    SUM(BYTES/1024/1024/1024)
    734.867561
    SQL>
    SQL> select sum(bytes/1024/1024/1024) from dba_data_files;
    SUM(BYTES/1024/1024/1024)
    2456.70493
    SQL>
    But in datafile the HWM is not reduced, i checked by moving the big tables, even though i am not getting the space in datafile level, i need to resize my datafile size to 1TB , take backup and clone the target which is having 1TB space.
    For example in apps_ts_tx_data we have only 243Gb segments but the datafiles size it is having 1000GB, we have to reduce the datafile size to that 300Gb, how to do it?
    =======
    SQL> select sum(bytes/1024/1024/1024) from dba_segments where tablespace_name='APPS_TS_TX_DATA';
    SUM(BYTES/1024/1024/1024)
    243.981201
    SQL> select sum(bytes/1024/1024/1024) from dba_data_files where tablespace_name='APPS_TS_TX_DATA';
    SUM(BYTES/1024/1024/1024)
    1070.2343
    SQL>
    ==========
    I thought of creating one tablespace of 300GB and move all objects into new tablespace , drop old tablespace and rename new tablespace to 'APPS_TS_TX_DATA', but we have objects like below, Pl guide me what is the best method of doing this and reduce my database size to 1TB. so that i can accomplish my task
    ====
    SQL> select DISTINCT SEGMENT_TYPE,count(*) FROM DBA_SEGMENTS where tablespace_name='APPS_TS_TX_DATA' group by SEGMENT_TYPE;
    SEGMENT_TYPE COUNT(*)
    INDEX 275
    INDEX PARTITION 509
    INDEX SUBPARTITION 96
    LOB PARTITION 8
    LOB SUBPARTITION 96
    LOBINDEX 460
    LOBSEGMENT 460
    TABLE 14615
    TABLE PARTITION 2079
    TABLE SUBPARTITION 96
    10 rows selected.
    ====
    Thanks in advance..

    Please see these docs.
    How to Reorganize INV Schema / Reclaim the High Watermark [ID 555058.1]     
    Optimizing Database disk space using Alter table shrink space/move compress [ID 1173241.1]
    Why is no space released after an ALTER TABLE ... SHRINK? [ID 820043.1]
    Various Aspects of Fragmentation [ID 186826.1]
    Thanks,
    Hussein

  • Draft Proposal: How to drop the Fx Prefix

    A draft proposal has been posted to the Flex Open Source Wiki documenting how we will adjust the packages, namespaces, and class names in Gumbo to allow us to drop the Fx class prefixes.  Please read and add your comments here:
    http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix
    Note that this page does not cover the necessary changes to CSS, which are documented on the forums at
    http://www.adobeforums.com/webx/.59b802c9
    Looking forward to your comments and suggestions,
    Ely.

    Hi Uri..
    Yes, thats what i have read but i still have ten temp tables with same prefix and different session code at the end . I am sure there are no open/active sessions tied to them .want to know if there is a bug with SQL server 2005 SP2 version  ?
    I am executing the stored proc using SQL Agent job so when it fails does it end the session ? if not how do i do it ?
    if i add the below query to the proc does it drop rest of the old temp tables ?
    IF EXISTS (
    SELECT *
    FROM sys.tables
    WHERE name LIKE '#temp%')
    DROP TABLE #temp
    Thanks, Sri The journey is what brings us happiness not the destination―Dan Millman

  • How to drop the last diskgroup in ASM 11g?

    Hello,
    I installed an ASM instance and created a DATA diskgroup using the Oracle installer. I would like to drop the diskgroup and re-create it using partitions instead of disk devices in order to use ASMLib.
    I have not found a way to get rid of the DATA diskgroup yet. How do I get rid of it?
    [+ASM@asm]$ sqlplus / as sysasm
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 3 20:12:05 2010
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Automatic Storage Management option
    SQL> DROP DISKGROUP data INCLUDING CONTENTS;
    DROP DISKGROUP data INCLUDING CONTENTS
    ERROR at line 1:
    ORA-15039: diskgroup not dropped
    ORA-15027: active use of diskgroup "DATA" precludes its dismountI used the following for data_0000 - data_0005, thinking it would be a good idea to drop each disk before dropping the diskgroup - which worked, although I had to use force for data_0000;
    SQL> alter diskgroup data drop disk data_0006;
    ... etc...
    SQL> alter diskgroup data drop disk data_0000 force;It all looks a bit weired now:
    SQL> select name, header_status, path from v$asm_disk;
                        MEMBER        /dev/sda
    _DROPPED_0000_DATA  UNKNOWN
    DATA_0001   MEMBER        /dev/sdb
    DATA_0002   MEMBER        /dev/sdc
    DATA_0003   MEMBER        /dev/sdd
    DATA_0004  MEMBER         /dev/sde
    DATA_0005   MEMBER        /dev/sdf
    SQL> alter diskgroup data dismount force;
    Diskgroup altered.
    SQL> alter diskgroup data mount;
    Diskgroup altered.
    SQL>

    Thanks for the reply.
    Unfortunately I cannot use EM since I do not have any database installed that uses the ASM instance yet, and to my knowledge ASM alone does not provide a web console.
    Anyway, I finally just manged to drop the diskgroup. Normally a diskgroup needs to be mountedto be dropped, but the force clause can be used for a diskgroup that is dismounted. So I tried it with the diskgroup dismounted... and it worked.
    SQL> alter diskgroup data dismount force;
    SQL> drop diskgroup data force including contents;
    Diskgroup dropped.
    Thanks!
    Edited by: Markus Waldorf on Sep 3, 2010 6:13 PM

  • How to drop the tables (articles) in subscription database MERGE replication.

    We have configured the merge replication from publication server to subscription server,
    Here I mistakenly selecting few tables (articles) in publication,
    Now I need to remove those mistakenly selected tables in subscription server database . 
    Note: I am trying to below way but unable to remove those tables in subscription server.
    1<sup>st</sup> I unselected those tables (articles) in publication, but not working.
    Could please tell me the how to remove those tables in subscription database.

    Ok that is normal, dont worry, if you mistakenly  chosen few tables, just add the new tables
    that you forgot it, just make click on the publication, you only have to Re-run the snapshot agent, i mean you must generate another snapshot and then synchronice with your suscriber, and then you will not need DROP the tables on the suscriber, if you have
    troubles yet, please post imagens to help you more !
    Thanks and regards.

  • How to define the datafile output_Name when output a report as spreatsheet

    Hi,
    in 10gR2 env. with AS 10 g / Reports work with RWSERVLET
    i do output a Report as a SPREADSHEET, that works fine,
    but
    to save this file there is a file_name like 'getjobid1234.xls'
    I tried to work with the report - title with boilerplate B_OR$REPORT_TITLE placed in margin ,
    but it doesn't work, no change in output_file_name
    and : how to change the B_OR$REPORT_TITLE dynamic while runtime ?
    any Help ?
    Norbert

    i use
    Desformat= SPREADSHEET
    Destype= CACHE
    web.show_document(/reports/rwservlet/getjobid<jobid>?server=ReportServer,_blank);
    with a 'name' as getjobid<jobid>
    desname doesn't work in CACHE - Mode ?
    with
    Desformat= SPREADSHEET
    Destype= FILE
    Desname= my_variable_report_name.xls
    there is the file my_variable_report_namet.xls saved on host-file-system
    ok, but can I call this with my_variable_report_name from cache without to save it everytime on server before ?

  • How to import the datafiles from one database to another

    Hi,
    I have got some datafiles from the existing database(Consider it as Database A), but it has been removed as of now.
    I am having the datafiles and control files of it.
    I have freshly installed one oracle Database(database B), I am planning to load those datafiles in the newly installed
    database.
    Is it possible, if so wat is the procedure.
    Both the databses are Oracle 11g.
    Help me out of this.
    Thanks.
    Regards
    Gatha

    Hi,
    As you said that you have data files and Control files, then using import quite no possbile, but you need to do it manually (as it exits in the Source System in same path).
    Initially, you copy these files from the Source System to Destination System that is
    Data Files and Control Files
    Next, you will get the DBID from the controlfile backup is you have Example :-
    CTL_SP_BAK_C-1507972899-20070228-00, then " 1507972899" is the DBID,
    Try to use the RMAN for this
    example :-
    Open the rman
    set dbid 1507972899
    then you need to build the initilizaition file to start an instance based on the Configuration
    or Copy the spfile from the back from source system if exits.
    Startup the DB in mount mode.
    You might get the error
    ORA-01078: failure in processing system parameters
    Now restore spfile from 'backup path' where you have copied files
    startup force nomount
    Now the instance is started
    connect to DB as sysdba
    check the control file parameter values and online redo Log files paths (Log_Archive_dest)
    Restore the old control file from backup, since the new instance must the know where the files are located
    restore controlfile from 'backup path'
    then shutdown the DB
    start in mount mode
    restore the DB - restore database
    Note: Recovery is dependent on the available archived (and online) redo logs.
    Final step will be Alter database open resetlogs;
    - Pavan Kumar N

  • How to drop the text in to the af:richTextEditor

    Hi All
    I am using Jdeveloper 11.1.1.4.0.
    I ahve a requrment like there is one af:table & af:richTextEditor. I want to drag & drop the table cell informationin af:richTextEditor.
    <af:table var="row" value="#{beanDnD.ValueSet}"
    id="t1" summary="collection drag source"
    rowSelection="single" contentDelivery="immediate"
    autoHeightRows="5">
    <af:column headerText="Product" id="c3">
    <af:outputText value="#{row.product}" id="ot1">
    <af:attributeDragSource attribute="value"/>
    </af:outputText>
    </af:column>
    <af:column headerText="Cost" id="c4">
    <af:outputText value="#{row.cost}" id="ot2"/>
    </af:column>
    </af:table>
    <af:richTextEditor label="Label 1" id="rte1" valueChangeListener="#{beanDnD.valuechange}"
    autoSubmit="true"
    binding="#{beanDnD.textBinding}"
    value="IceCream">
    <af:attributeDropTarget attribute="value"/>
    <af:attributeDropTarget attribute="invisible"/>
    </af:richTextEditor>
    Bean value chnage code
    public void valuechange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    System.out.println(valueChangeEvent.getOldValue());
    String s1 = valueChangeEvent.getOldValue().toString();
    System.out.println(valueChangeEvent.getNewValue());
    String s2 = valueChangeEvent.getNewValue().toString();
    textBinding.setValue(s1+s2);
    AdfFacesContext.getCurrentInstance().addPartialTarget(textBinding);
    but its not working :(
    I did same with af:inputText & its working properly.Pz suggest me waht should i do?any help would be appriciated.
    Thanks
    Charu

    Hi Charu,
    I know this was a long time ago but do you remember if you ever found a solution for this?
    Dave

  • How to drop the contents on an internal table?

    Dear all,
    can some one suggest me the code to drop the content of an internal table.
    VJ

    Following are the different ways of DELETIONS from ITAB, DTAB and FILE:
    DELETE FROM dbtab       WHERE cond.
    DELETE FROM (dbtabname) WHERE cond.
    - DELETE dbtab.
    DELETE *dbtab.
    DELETE (dbtabname) ... .
    - DELETE dbtab       FROM TABLE itab.
    DELETE (dbtabname) FROM TABLE itab.
    - DELETE dbtab  VERSION vers.
    DELETE *dbtab VERSION vers.
    Delete from an internal table
    - DELETE itab.
    - DELETE itab INDEX idx.
    - DELETE itab FROM idx1 TO idx2.
    - DELETE itab WHERE cond.
    - DELETE ADJACENT DUPLICATES FROM itab.
    Delete a program
    - DELETE REPORT prog.
    Delete text elements
    - DELETE TEXTPOOL prog LANGUAGE lg.
    Delete a data cluster from a database table
    - DELETE FROM DATABASE dbtab(ar) ...ID key.
    Delete a data cluster from the cross-transaction application buffer
    - DELETE FROM SHARED BUFFER dbtab(ar) ...ID key.
    Delete a file
    - DELETE DATASET dsn.
    Delete a screen
    - DELETE DYNPRO f.
    Thanks,
    Santosh

  • How to play the datafile generated by cdrdao

    the command cdrdao --device /dev/cdrom --datafile fichier fichier.toc produce a datafile and a toc from an audio cd that can be used to burn a copy of the cd (again with cdrdao, no problem here). I would like to know if it is possible to play the datafile without burning it. Does any one what format it is? There must exists mplayer options to play it but I am lost.
    I have just found the solution. In case someone is interested, sox can play it:
    play -t cdda <datafile>
    Last edited by olive (2009-09-09 07:09:22)

    Hi zhoudeng,
    Would it be possible please for you to provide some more information.
    What kind of robot is it that you are using? Do you having any LabVIEW coding that you could attach please?
    It would be benefitial to attach your coding that generates the A star plan as well as what you're currently trying to do.
    Thanks,
    Tori
    Student

  • How to drop the reversed GRs while selecting from EKBE ?

    Hi,
    I have a requirement to select only GR which are not reversed. Suppose we have a PO with 2 items with 3000 quantity each. First time user did GR (using MIGO) with quantity 1000 for each item by mistake. So the user comes back to MIGO, reverse it and do a GR again for 1100 each item. If you look at EKBE for this PO, you will see three lines for each item. First line will be GR(moment type 101) with quantity 1000, 2nd line will be reverse of it ( with moment type 102), with quantity 1000 and the 3rd line will the new GR(moment type 101) with quantity 1100. Now in my requirement is to select this new GRs from EKBE for each item. I am using a select..for all entries of ts_ekpo (assume that this table is filled already with right PO items) internal table into another internal table ts_ekbe. So I am selecting total 6 lines, 3 lines for each item. I don't want to select the reversed lines. Will there be any flag in EKBE table to identify that the line is reversed or that the line is new GR line ? If you need more clarity please let me know. Your help will be appriciated.
    Thank you,
    Surya.

    Hi,
    You will have to 1st retrieve all the Mat Docs corresponding to the POs from the MSEG table for Movement type 101.
    If you want to whether the Mat Doc is reversed, as hendy has suggested you will have to do the following.
    If you consider that T_MSEG is the Internal table that was populated with the Mat Docs for Move Type 101.
    SELECT ...... FOR ALL ENTRIES IN T_MSEG
                        WHERE SJAHR  EQ T_MSEG-SJAHR
                              AND SMBLN EQ T_MSEG-MBLNR
                              AND SMBLP EQ T_MSEG-ZEILE
                              AND BWART EQ '102'.
    This suggests that for Move Type 102 if you find the actual Mat Doc existing in the field SMBLN and SMBLP, then the GR is reversed.
    regards,
    Mahesh

  • How to drop datafiles in oracle 10g r2

    Hi all,
    Db :oracle 10.2.0.3
    os:solaris 10
    tablespace name: jllp_tabs01
    datafile:
    /ora/data001/jllp/jllp_tbs01_tbl_1.dbf
    /ora/data001/jllp/jllp_tbs01_tbl_2.dbf
    /ora/data001/jllp/jllp_tbs01_tbl_3.dbf
    /ora/data001/jllp/jllp_tbs01_tbl_4.dbf
    its has consisting of 4 datafiles, I need to drop the 2 of them perminently.
    the datafile are having data.
    how to drop the datafiles.
    please suggest me.

    There is no way to drop the datafiles once they are added to the tablespace. The command given by Asif , offline drop won't actually drop the datafile but would be an indication only to Oracle that you would be dropping the entire tablespace after issuing this command. In 11g, there is a command to drop the datafile but only if it's completely empty.
    HTH
    Aman....

  • 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

Maybe you are looking for

  • + Camera Raw Feature Requests +

    UPDATE: We're interested in what changes you would like see in our products. Do you have an idea for a feature that would help your workflow? Is there a small change that could be made to make your life a little easier? Let us know!  Share an Idea, A

  • Java connectivity with db2 in linux

    hi all, i wish to know how to connect java with db2 in linux.actually which is the string that is to be included in the following: class.forName("//which is the string that is to be included here"); Connection con("jdbc:????");

  • ^7External Hardrives Portable MacBook

    Hello, does anyone know the best and least expensive portable, external hard drives for MacBook that are 1TB, 3.0 USB with the most featires.

  • Local Cache Visibility from the Cluster

    Hi, can you give me an explanation for the following Coherence issue, please ? I found in the documentation that the Coherence local cache is just that: a cache that is local to (completely contained within) a particular cluster node and is accessibl

  • Unable to join Unit Cost(Cost table) to Sales Table.

    Hi All, I am beginner for OBIEE technology.May be this question is silly for you but i am facing issue in it.I am mentioning my issue below:- We have two tables one is SALES(Fact Table ) and second one is COST (Fact Table). I want to apply Calculatio