adding datafile to a LOCAL managed TS - 64k overhead
|
1627
2004-MAY-25 12:49:25
|
|
Moderator
|
|
|
Registered On: Mar 2006
Total Posts: 292
|
|
Adding datafile to a LOCAL managed TS - 64k overhead
PROBLEM:
----------
After adding 327680K datafile to a tablespace the free space of that datafile
shows as 163840K although there are no EXTENTS have been allocated/reported in
the DBA_EXTENTS view.
*** DATAFILE USAGE ***
%
Tablespace Name File Name Size KB Free KB Size MB Free MB Used
--------------- ---------------------------------------- ---------- ---------- --------- --------- -------
XDW_LRGD01 /u06/oradata/XYLADW/xdw_lrgd01_03.dbf 1966144 163840 1,920.06 160.00 91.67
XDW_LRGD01 /u06/oradata/XYLADW/xdw_lrgd01_04.dbf 327680 163840 320.00 160.00 50.00
XDW_LRGD01 /u06/oradata/XYLADW/xdw_lrgd01_01.dbf 1966144 0 1,920.06 .00 100.00
XDW_LRGD01 /u06/oradata/XYLADW/xdw_lrgd01_02.dbf 1966144 0 1,920.06 .00 100.00
12:26:24 SYSTEM@XYLADW:olympia> select RELATIVE_FNO
12:26:37 2 from dba_data_files
12:26:41 3 where file_name='/u06/oradata/XYLADW/xdw_lrgd01_04.dbf';
RELATIVE_FNO
------------
11
1 row selected.
12:27:02 SYSTEM@XYLADW:olympia> select bytes/1024 kbytes
12:27:27 2 from dba_data_Files
12:27:33 3 where RELATIVE_FNO=11;
KBYTES
----------
327680
1 row selected.
12:27:36 SYSTEM@XYLADW:olympia> ttit off
12:27:44 SYSTEM@XYLADW:olympia> select bytes/1024 free_kbytes
12:27:56 2 from dba_free_Space
12:28:00 3 where RELATIVE_FNO=11;
FREE_KBYTES
-----------
163840
1 row selected.
12:28:04 SYSTEM@XYLADW:olympia> select segment_name
12:28:14 2 from dba_extents
12:28:18 3 where RELATIVE_FNO=11;
no rows selected
12:28:22 SYSTEM@XYLADW:olympia>
12:29:06 SYSTEM@XYLADW:olympia> select file_name, tablespace_name
12:29:20 2 from dba_data_Files
12:29:22 3 where RELATIVE_FNO=11;
Data File Name Tablespace Name
---------------------------------------- ---------------
/u06/oradata/XYLADW/xdw_lrgd01_04.dbf XDW_LRGD01
1 row selected.
12:29:28 SYSTEM@XYLADW:olympia> select * from dba_tablespaces
12:29:35 2 where tablespace_name='XDW_LRGD01';
Tablespace Name INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE MIN_EXTLEN STATUS CONTENTS LOGGING EXTENT_MAN ALLOCATIO PLU
--------------- -------------- ----------- ----------- ----------- ------------ ---------- --------- --------- --------- ---------- --------- ---
XDW_LRGD01 167772160 167772160 1 2147483645 0 167772160 ONLINE PERMANENT LOGGING LOCAL UNIFORM NO
1 row selected.
12:29:44 SYSTEM@XYLADW:olympia>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SOLUTION:
----------
You must add 64K for the DBF header in a LOCAL managed TS the extent map is
stored in the 64K header of the datafile apparently if you don't accommodate for
that overhead ORACLE will use the UNIFORM extent size to store it's bitmap of
the extents and since this TS has 160MB UNIFORM extents it's a HUGE waste of
space.
-- adding 64K for the dbf header
-- [327680+64=327744]
12:29:44 SYSTEM@XYLADW:olympia> alter database datafile '/u06/oradata/XYLADW/xdw_lrgd01_04.dbf'
12:32:01 2 resize 327744k;
Database altered.
12:32:19 SYSTEM@XYLADW:olympia> select bytes/1024 free_kbytes
12:33:23 2 from dba_free_Space
12:33:28 3 where RELATIVE_FNO=11;
FREE_KBYTES
-----------
327680
1 row selected.
|
1628
2004-MAY-25 12:50:04
|
|
Moderator
|
|
|
Registered On: Mar 2006
Total Posts: 292
|
|
.