Delete a datafile in 11gR2 ASM

Here is the current datafiles of the database 11gR2, 11.2.0.1 on the ASM file system.
SQL> select FILE_NAME,TABLESPACE_NAME from dba_data_files;
FILE_NAME TABLESPACE_NAME
+DATA01/heat/datafile/testtbs.274.807968419             TESTTBS
+DATA01/heat/datafile/testtbs.266.807968493             TESTTBS
+DATA01/heat/datafile/testtbs.258.807968511             TESTTBS
1/ Use RMAN to backup the whole db onto the disk
2/ In RMAN, check the backup: List backup; See all the backup including the above data files;
3/ Run this cmd to drop 1 datafile, In SQL> ALTER TABLESPACE TESTTBS drop datafile '+DATA01/heat/datafile/testtbs.258.807968511';
4/ Verify it, whether that data file deleted, yes it was deleted.
SQL> select FILE_NAME,TABLESPACE_NAME from dba_data_files;
FILE_NAME TABLESPACE_NAME
+DATA01/heat/datafile/testtbs.274.807968419             TESTTBS
+DATA01/heat/datafile/testtbs.266.807968493             TESTTBS
5/ In RMAN, check the backup again: List backup; It's not there in the backup. Why's that ?????????????????????
BS Key Type LV Size Device Type Elapsed Time Completion Time
6 Full 935.09M DISK 00:01:15 21-FEB-2013 11:43:44
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20130221T114228
Piece Name: +FRA01/heat/backupset/2013_02_21/nnndf0_tag20130221t114228_0.344.807968549
List of Datafiles in backup set 6
File LV Type Ckp SCN Ckp Time Name
1 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/system.256.807898985
2 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/sysaux.261.807898985
3 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/undotbs1.260.807898985
4 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/users.268.807898985
5 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/testtbs.274.807968419
6 Full 999944 21-FEB-2013 11:42:29 +DATA01/heat/datafile/testtbs.266.807968493
7 Full 999944 21-FEB-2013 11:42:29
6/ Try restore the deleted data file, it's not available in the backup ????? I do not understand this ? Really appreciate someone could explain this ?????

When you drop a datafile, the database instance updates controlfiles, redologs and SCN numbers. The datafile you have in your backup will no longer match the the rest of the database environment, so it cannot be restored without restoring the complete database prior to the time the datafile was dropped. Similarly you cannot mount or restore the datafile of a different database. The database does not maintain recovery information for a datafile that does not exist. If you loose the datafile, e.g. delete it from the filesystem, you can restore the datafile and recover the information using the existing controlfile and redologs. That is all normal and is not influenced by ASM.

Similar Messages

  • Question: 10gR2 database can not see the 11gR2 ASM diskgroup?

    Hi there,
    env:
    uname -rm
    2.6.18-92.1.22.el5xen x86_64
    Single server(non-RAC)
    note: we don't want to upgrade 10gr2 database into 11gR2 yet. But we created the 11gR2 ASM, then a 11gr2 database on ASM, and plan to migrate datafile in 10gR2 database to 11gR2 ASM
    1. oracle 10gR2 installed first version: 10.2.0.3.0
    2. then install 11gR2 Grid Infrastructure, and created ASM (version 11gr2)
    $ sqlplus / as sysasm
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 19 10:30:56 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> col name form a15
    SQL> col COMPATIBILITY form a15
    SQL> col DATABASE_COMPATIBILITY form a15
    SQL> l
    1* select name , STATE, COMPATIBILITY, DATABASE_COMPATIBILITY from v$asm_diskgroup
    SQL> /
    NAME STATE COMPATIBILITY DATABASE_COMPAT
    ORCL_DATA1 MOUNTED 11.2.0.0.0 10.1.0.0.0
    ORA_DATA MOUNTED 10.1.0.0.0 10.1.0.0.0
    3. in 10gR2 database
    sqlplus /
    SQL*Plus: Release 10.2.0.3.0 - Production on Tue Oct 19 12:12:31 2010
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning and Data Mining options
    SQL> select * from v$asm_diskgroup;
    no rows selected
    4. pin the node into css
    # /u01/app/product/11.2.0/grid/bin/crsctl pin css -n mynodename
    CRS-4000: Command Pin failed, or completed with errors.
    Question: 10gR2 database can not see the 11gR2 ASM diskgroup?
    please help
    Thanks
    Scott

    What is the output of
    olsnodes -t -n
    Also, see unix error log and ohasd error log if you find anything in that

  • How to delete client from oracle 10g ASM

    Hi,
    I would like to know how to delete client from oracle 10g ASM, while configuring Dataguard in same windows os i have by mistake created the standby in ASM.
    However later i have corrected the datafile destination. My Primary database is in ASM and the standby in disk.
    Could anyone please tell me how do i delete the client from ASM. On view from asmcmd it shows db_unknown and from v$asm_client
    GROUP_NUMBER INSTANCE_NAME
    DB_NAME STATUS
    SOFTWARE_VERSION
    COMPATIBLE_VERSION
    1 stby
    stby CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    Thanks and regards,
    shaan

    Hi Deepak,
    Pls see the result from the view, i wanted to delete stby
    SQL> select * from v$asm_client;
    GROUP_NUMBER INSTANCE_NAME
    DB_NAME STATUS
    SOFTWARE_VERSION
    COMPATIBLE_VERSION
    1 prim
    prim CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    2 prim
    prim CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    1 stby
    stby CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    regards,
    shaan

  • Delete the datafile

    Hi all,
    I want to delete Datafile from my ASM instance. I gave a bad name to my data file and i want to remove it now.
    SQL> select file_name,TABLESPACE_NAME,ONLINE_STATUS from dba_data_files where TABLESPACE_NAME ='USERS';
    FILE_NAME TABLESPACE_NAME ONLINE_STATUS
    +DATA/orcl/datafile/users2           USERS                RECOVER
    Please help me to resolve this issue.
    Thanks,
    krish

    user2281943 wrote:
    Hi all,
    I want to delete Datafile from my ASM instance. I gave a bad name to my data file and i want to remove it now.
    SQL> select file_name,TABLESPACE_NAME,ONLINE_STATUS from dba_data_files where TABLESPACE_NAME ='USERS';
    FILE_NAME TABLESPACE_NAME ONLINE_STATUS
    +DATA/orcl/datafile/users2           USERS                RECOVER
    You can NOT delete datafiles once they are part of the database.There is a command to drop the datafile but that works only when the file is completely empty. For your "bad name" issue of te file, all what you needed to do was to use the Rename command and to rename the file. But what appears is that the file is either offlined or is not available. Do you have archivelog mode enabled and have all the archivelogs with you? What appears is that you need to recover the said file before you can do anything else over it.
    HTH
    Aman....

  • How to delete archive log files from ASM through Grid Control

    Hi
    Anybody suggest me how to delete archive log files from ASM through Grid Control.
    Thanks

    It is important to specify both, the oracle version and os version when posting, so confusions can be avoided.
    In this particular case, since you are referring to asm and grid control you could be talking about either 10gR1, 10gR2 or 11gR1; but I strongly suggest you to avoid us to be guessing. In either case, you sould go to the maintenance tab of the target database and program a scheduled 'delete noprompt obsolete;' procedure. This will purge the information stored at the Flash recovery area, which I assume you have declared inside the ASM.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Deleting a datafile

    In Oracle8i, how does one delete or drop a datafile? The file does not physically exist on disk. When I try to "create tablespace datafile 'foo' size 100m", it reports that it cannot process the statement because the "datafile already exists". It seems that I need to tell Oracle to delete the datafile before I can recreate it.

    The "and datafiles" is not supported in 8i. Believe it or not, I think the prescribed method of deleting datafiles is to do so at the OS prompt (gulp!). Seems strange since Oracle creates the datafile via an SQL command (create tablespace <foo> datafile <fname>).

  • DELETE DATAFILE (database) FROM ASM not using dbca

    Hi All
    I have RAC(2 node) on Windows 2003 EE, Oracle 10g R2
    How i can delete file from my asm instance?
    For example, i create database manualy then i want delete this database? how i can delete file from asm? dbca dont see this instance.
    a long time ago, i have also TEST db, i delete this db using dbca but in ASM (EM console) i still see this db, there are no file but i see "word" TEST how i can delete that?
    thanks in advice

    http://www.oracle.com/technology/products/database/asm/pdf/asm_10gr2_bestpractices%2009-07.pdf
    page 26
    SELECT concat('+'||gname, sys_connect_by_path(aname, '/')) full_alias_path FROM
    (SELECT g.name gname, a.parent_index pindex, a.name aname,
    a.reference_index rindex FROM v$asm_alias a, v$asm_diskgroup g
    WHERE a.group_number = g.group_number)
    START WITH (mod(pindex, power(2, 24))) = 0
    CONNECT BY PRIOR rindex = pindex;
    :)

  • RAC - DBCA -silent deleteDatabase not deleting underlying datafiles

    Hello All,
    I have a small question. I recently deleted a RAC database on 11GR2 (Grid Infrastructure) using the following command as the database owner (oracle)
    dbca -silent -deleteDatabase -sourcdDB mydb -sysDBAPassword mypassword -sysDBAUserName sysThe command execute properly. But I see the datafile structure is still under ASM. I'm wondering if the command should have been run as grid rather then oracle, because the documentaiton states:
    http://docs.oracle.com/cd/E11882_01/install.112/e10813/dbcacrea.htm#BABIGJAH
    "At this point, you have accomplished the following:"
    Deleted the selected database from the cluster
    Deleted high availability services that were assigned to the database
    Deleted the Oracle Net configuration for the database
    Deconfigured Database Control for that database
    Deleted the OFA directory structure for that database from the cluster
    Deleted the data files if the data files were not on raw devices
    Thanks in advance for your advise and assistance.
    Jan S.

    Check with this doc
    Removing a Node from a 10gR1 RAC Cluster [ID 269320.1]
    regards,
    Shaan

  • 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

  • 11gR2 ASM on files

    Hi, is there a way to install 11.2.0.2 single ASM instance which will use OS files as devices. I know that in 10G it was possible to user ASMALLOW_ONLY_RAW_DISKS parameters to archive this. Is there something like with 11gR2 using grid infra. OS is Solaris 10 SPARC.

    Please follow this link for a lot of info i think you need.
    https://support.oracle.com/CSP/ui/flash.html#tab=KBHome(page=KBHome&id=gsrlealh()),(page=KBNavigator&id=gsrlk8y8(searchControl=1146&filterSource=KB&userQuery=oracle%20rac%2010gr2&searchMode=1145&&viewingMode=1141)),(page=KBNavigator&id=gsrmphbb(from=favorites&&viewingMode=1143)),(page=KBNavigator&id=gsrmqkiu(from=favorites&&viewingMode=1143))

  • ASM 11gR2 ASM functionality

    Does all of the new ASM functionality for 11gR2 work with the Exadata database machine (ex. ASM Cluster & Single Node File System (ACFS)l)?

    All of ASM's functionality EXCEPT ACFS work.
    This will probably change in a future version.
    On Exadata, clients who need filesystem space use DBFS instead.
    rgds

  • 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.

  • Oracle 11gR2 ASM issue

    Environment: HP-UX / Oracle 11gR2 RAC with ASM
    We renamed our ASM disk from c5t1d3 to ora_c5t1d3 in UNIX, and now we want to remove the old name c5t1d3, before that we want to change the disk on ASM diskgroup from c5t1d3 to ora_c5t1d3.
    I dropped the disk c5t1d3 and try to add the same disk with different name ora_c5t1d3, but I am not able to add, I am getting the following error
    SQL> alter diskgroup asmcrsdg1 add disk '/dev/rdsk/ora_c5t1d3';
    alter diskgroup asmcrsdg1 add disk '/dev/rdsk/ora_c5t1d3'
    ERROR at line 1:
    ORA-15032: not all alterations performed
    ORA-15020: discovered duplicate ASM disk "ASMCRSDG1_0006"
    But this disk is not there, when I try to drop this disk, I am getting the following error,
    SQL> alter diskgroup asmcrsdg1 drop disk ASMCRSDG1_0006;
    alter diskgroup asmcrsdg1 drop disk ASMCRSDG1_0006
    ERROR at line 1:
    ORA-15032: not all alterations performed
    ORA-15054: disk "ASMCRSDG1_0006" does not exist in diskgroup "ASMCRSDG1"
    I am confused, Can anyone please help me to understand what’s going on here.

    Check if ASM disk is still a part of ASM disk group.
    1.
    Query header_status and mount_status columns in V$ASM_DISK
    2.
    # dd if=/dev/rdsk/c5t1d3 of=/tmp/disk.out bs=8192 count=1000
    # vi /tmp/disk.out
    If the disk is still a part of the diskgroup, then clean up ASM disk header.
    # dd if=/dev/null of=/dev/rdsk/c5t1d3 bs=8192 count=1000
    Add a renamed disk again.

  • 11gR2: ASM configuration failed during root.sh execution.

    Hi All,
    Need your help, i am trying to install 11gR2 and using ASM for voting disk and ocr. when i executed root.sh then it failed saying "Initial cluster configuration failed" . when i checked log (opt/oracle/prod
    uct/CRS/cfgtoollogs/crsconfig/rootcrs_auto.log) then found
    2010-02-17 10:39:54: Configuring ASM via ASMCA
    2010-02-17 10:39:54: Executing as oracle: /opt/oracle/product/CRS/bin/asmca -sil
    ent -diskGroupName DATA -diskList /dev/vgora/rora_vote_disk,/dev/vgora/rora_ocr
    -redundancy EXTERNAL -diskString '/dev/vgora/*,/dev/vgasm/*,/dev/rdisk/*' -confi
    gureLocalASM
    2010-02-17 10:39:54: Running as user oracle: /opt/oracle/product/CRS/bin/asmca -
    silent -diskGroupName DATA -diskList /dev/vgora/rora_vote_disk,/dev/vgora/rora_o
    cr -redundancy EXTERNAL -diskString '/dev/vgora/*,/dev/vgasm/*,/dev/rdisk/*' -co
    nfigureLocalASM
    2010-02-17 10:39:54: Invoking "/opt/oracle/product/CRS/bin/asmca -silent -disk
    GroupName DATA -diskList /dev/vgora/rora_vote_disk,/dev/vgora/rora_ocr -redundan
    cy EXTERNAL -diskString '/dev/vgora/*,/dev/vgasm/*,/dev/rdisk/*' -configureLocal
    ASM" as user "oracle"
    2010-02-17 10:40:10: Configuration of ASM failed, see logs for details
    2010-02-17 10:40:10: Did not succssfully configure and start ASM
    2010-02-17 10:40:10: Exiting exclusive mode
    2010-02-17 10:40:10: Command return code of 1 (256) from command: /opt/oracle/pr
    oduct/CRS/bin/crsctl stop resource ora.crsd -init
    2010-02-17 10:40:10: Stop of resource "ora.crsd -init" failed
    2010-02-17 10:40:10: Failed to stop CRSD
    2010-02-17 10:40:11: Command return code of 1 (256) from command: /opt/oracle/pr
    oduct/CRS/bin/crsctl stop resource ora.asm -init
    2010-02-17 10:40:11: Stop of resource "ora.asm -init" failed
    2010-02-17 10:40:11: Failed to stop ASM
    2010-02-17 10:40:36: Initial cluster configuration failed. See /opt/oracle/prod
    uct/CRS/cfgtoollogs/crsconfig/rootcrs_auto.log for details
    Please guide me , how to proceed further.

    CSSD does not start (Cluster Manager)
    CSSD does not start (Cluster Manager)

  • Delete Temp Datafiles

    Hi all,
    The temporary tablespace datafiles were old and occupy lot of space. Can I safely remove them or shall I backup them to disk.
    Thanks.

    786923 wrote:
    Hi all,
    The temporary tablespace datafiles were old and occupy lot of space. Can I safely remove them or shall I backup them to disk.
    Thanks.Do not need backup of temp tablespace,but you can create new temporary tablespace and delete old ts as
    create temporary tablespace new_tempts tempfile 'tempfile_full_path'  size <size> autoextend on next 30M;
    alter database default temporary tablespace  new_tempts;
    drop tablespace old_ts_name;

Maybe you are looking for

  • I need to reinstall Snow Leopard on a MacBook 1.1 after replacing the hard drive.  The DVD drive is not working.  What is the best way to do this?

    My hard drive died.  I installed a new one and want to restore from my Time Machine back up, but my DVD drive will not read my Snow Leopard upgrade disc.  It did read the grey Tiger install discs that came with the coumputer, so I now am back to 10.4

  • Acpi HP6710b lid close bug

    Common problem with HP6710b is to froze on lid close. I found on arch wiki solution for this crap.... echo "1" >  /proc/acpi/video/C098/DOS I need to place this command on startup.... but where? During run rc.local  /proc/acpi/video/C098/DOS does not

  • Notification Center Missing?

    Hi, After a visit to the Apple Store in Tokyo with this MacBook , I came home and reinstalled OSX and upgraded other stuff. During this time I discovered that the Notification Center which I have on my iMac is missing from the Air. The icon is missin

  • How to convert Localized formatted String in Amount?

    Hello All, I have once scenario where I need to convert localized string amount to parse and make it long amount. Example: In russia, people write 1000 as "1 000". Now what I need to do is to parse this "1 000" and get 1000. Is there any way in java,

  • I can't send mail (Gmail) with App Mail on IOS 7

    Hi, After create Google account on my ipad, I can receive my gmail mails but I can't send mail with "Mail App". With the Gmail App I can receive and sent mails. I wish send mail with App Mail, what should I do? Thanks PS : Sorry for my bad english.