Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Delete a datafile in 11gR2 ASM

568397Feb 20 2013 — edited Feb 21 2013
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 ?????
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2013
Added on Feb 20 2013
7 comments
1,455 views