Oracle 11g – DROP database command on ACFS

oracleoracle-11g-r2

In Oracle 11g and higher (on RHEL 6) issuing the 'drop database' command in mount restrict mode will delete all the DB's ASM datafiles. Can somebody tell me if this command also drops all ACFS datafiles? The documentation only says it's doesn't drop datafiles on raw devices.

Best Answer

And ACFS is not raw device, so the files will be deleted.

My ACFS:

[oracle@o6ca1 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@o6ca1 ~]$ acfsutil info fs /oradata
/oradata
    ACFS Version: 11.2.0.4.0
    flags:        MountPoint,Available
    mount time:   Wed Oct 31 15:21:46 2018
    volumes:      1
    total size:   10737418240
    total free:   8938848256
    primary volume: /dev/asm/oradata-379
        label:
        flags:                 Primary,Available,ADVM
        on-disk version:       39.0
        allocation unit:       4096
        major, minor:          247, 194049
        size:                  10737418240
        free:                  8938848256
        ADVM diskgroup         DATA
        ADVM resize increment: 33554432
        ADVM redundancy:       unprotected
        ADVM stripe columns:   4
        ADVM stripe width:     131072
        compatible.advm:       11.2.0.0.0
    number of snapshots:  0
    snapshot space usage: 0
    replication status: DISABLED

My database:

[oracle@o6ca1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ? ORCL
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@o6ca1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 31 15:27:32 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/oradata/ORCL/users01.dbf
/oradata/ORCL/undotbs01.dbf
/oradata/ORCL/sysaux01.dbf
/oradata/ORCL/system01.dbf

Dropping the database:

SQL> startup force mount exclusive restrict
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2260088 bytes
Variable Size             335545224 bytes
Database Buffers          725614592 bytes
Redo Buffers                5517312 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> exit

Files are deleted:

[oracle@o6ca1 ~]$ ls -l /oradata/ORCL/
total 0

And the free space is also greater than it was before:

[oracle@o6ca1 ~]$ acfsutil info fs /oradata
/oradata
    ACFS Version: 11.2.0.4.0
    flags:        MountPoint,Available
    mount time:   Wed Oct 31 15:21:46 2018
    volumes:      1
    total size:   10737418240
    total free:   10579529728
    primary volume: /dev/asm/oradata-379
        label:
        flags:                 Primary,Available,ADVM
        on-disk version:       39.0
        allocation unit:       4096
        major, minor:          247, 194049
        size:                  10737418240
        free:                  10579529728
        ADVM diskgroup         DATA
        ADVM resize increment: 33554432
        ADVM redundancy:       unprotected
        ADVM stripe columns:   4
        ADVM stripe width:     131072
        compatible.advm:       11.2.0.0.0
    number of snapshots:  0
    snapshot space usage: 0
    replication status: DISABLED