Thursday, April 03, 2014

Now I know why SYSTEM tablespace comes with dictionary extent manament in a vendor application

It seems the database uses raw devices, and created manually (not using dbca), when the option is not specified explicitly, by default the SYSTEM tablespace is created  as DICTIONARY managed.

It seems quite a few article list disadvantages of DICTIONARY extent management, but don't where it come from.

Below is my testing.

default setting for SYSTEM datafile



-bash-3.2$ cat cre_db.sql
STARTUP NOMOUNT
CREATE DATABASE "RAWDB1"
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
DATAFILE '/software/oracle/admin/RAWDB1/conf/RAWDB1_system_raw_1000m' size 900m reuse
sysaux datafile '/software/oracle/admin/RAWDB1/conf/RAWDB1_sysaux_raw_600m'size 560m  reuse
undo tablespace "UNDOTBS1" datafile '/software/oracle/admin/RAWDB1/conf/RAWDB1_undotbs1_raw_500m' size 480m reuse
default temporary tablespace temp tempfile '/software/oracle/admin/RAWDB1/conf/RAWDB1_temp_raw_250m' size 200m reuse
LOGFILE
  GROUP 1 ('/software/oracle/admin/RAWDB1/conf/RAWDB1_redo1_1_raw_120m')  SIZE 50M reuse ,
  GROUP 2 ('/software/oracle/admin/RAWDB1/conf/RAWDB1_redo1_2_raw_120m')  SIZE 50M reuse
user sys identified by "oracle123" user  system identified by "oracle123" ;
 
and
run the $ORACLE_HOME/rdbms/admin/catalog.sql and $ORACLE_HOME/rdbms/admin/catproc.sql.




17:00:32 SYS@RAWDB1> select tablespace_name , extent_management from dba_tablespaces;

TABLESPACE_NAME                EXTENT_MAN
------------------------------ ----------
SYSTEM                         DICTIONARY
UNDOTBS1                       LOCAL
SYSAUX                         LOCAL
TEMP                           LOCAL

4 rows selected.
 

Create non-dictionary extent management for SYSTEM tablespace


-bash-3.2$ cat cre_db_non_dict_system.sql
STARTUP NOMOUNT
CREATE DATABASE "RAWDB1"
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
DATAFILE '/software/oracle/admin/RAWDB1/conf/RAWDB1_system_raw_1000m' size 900m reuse extent management local
sysaux datafile '/software/oracle/admin/RAWDB1/conf/RAWDB1_sysaux_raw_600m'size 560m  reuse
undo tablespace "UNDOTBS1" datafile '/software/oracle/admin/RAWDB1/conf/RAWDB1_undotbs1_raw_500m' size 480m reuse
default temporary tablespace temp tempfile '/software/oracle/admin/RAWDB1/conf/RAWDB1_temp_raw_250m' size 200m reuse
LOGFILE
  GROUP 1 ('/software/oracle/admin/RAWDB1/conf/RAWDB1_redo1_1_raw_120m')  SIZE 50M reuse ,
  GROUP 2 ('/software/oracle/admin/RAWDB1/conf/RAWDB1_redo1_2_raw_120m')  SIZE 50M reuse
user sys identified by "oracle123" user  system identified by "oracle123" ;





17:24:40 SYS@RAWDB1> select tablespace_name,  extent_management from dba_tablespaces;

TABLESPACE_NAME                EXTENT_MAN
------------------------------ ----------
SYSTEM                         LOCAL
UNDOTBS1                       LOCAL
SYSAUX                         LOCAL
TEMP                           LOCAL