Hallo John,
I know 3 ways to get the function “Minimum size” for datafiles:
-
Tablespaces Space select (F4) (dc) datafile
-
Tablespaces Files select (dc) datafile
-
Schema Browser Tablespaces select (dc) datafile
(dc) = doubleclick
12.5.: All ways lead me to the same Message (select privilege).
12.1.: All ways give me an result value.
Now sample : Using (3) via Schema Browser, Tablespaces, datafile
12.1:
Session: SYSTEM@EPBW.WORLD
Timestamp: 12:49:45.037
Select bytes, file_id, bytes / blocks
from dba_data_files
where file_name = :fname
:fname(VARCHAR[46],IN/OUT)=’+EPBW_DATA/epbw/datafile/work64.1128.817720527’
Session: SYSTEM@EPBW.WORLD
Timestamp: 12:49:45.109
Select sum(bytes)
from dba_free_space
where tablespace_name = :tsn
and file_id = :fid
and block_id >= nvl((Select (block_id + (bytes/8192))
from dba_extents
where block_id = (Select max(block_id)
from dba_extents
where file_id = :fid
and tablespace_name = :tsn)
and file_id = :fid
and tablespace_name = :tsn), 0)
:tsn(VARCHAR[6],IN/OUT)=‘WORK64’
:fid(INTEGER,IN/OUT)=144
—> Datafile can be shrunk to a minimum size of apporximatly 1 MB.
12.5.:
Session: SYSTEM@EPBW.WORLD
Timestamp: 12:54:45.332
Select bytes, file_id, bytes / blocks
from dba_data_files
where file_name = :fname
:fname(VARCHAR[46],IN/OUT)=’+EPBW_DATA/epbw/datafile/work64.1128.817720527’
Session: SYSTEM@EPBW.WORLD
Timestamp: 12:54:45.422
Select sum(bytes)
from dba_free_space
where tablespace_name = :tsn
and file_id = :fid
and block_id >= nvl((Select (block_id + (bytes/8192))
from dba_extents
where block_id = (Select max(block_id)
from dba_extents
where file_id = :fid
and tablespace_name = :tsn)
and file_id = :fid
and tablespace_name = :tsn), 0)
:tsn(VARCHAR[6],IN/OUT)=‘WORK64’
:fid(INTEGER,IN/OUT)=144
–> Message
Best Regards
Felix