You are on page 1of 3

Note:243246.

1 10G : SYSAUX Tablespace


Note:329984.1 Usage and Storage Management of SYSAUX tablespace occupants SM/AWR
, SM/ADVISOR, SM/OPTSTAT and SM/OTHER
Note:552880.1 General guidelines for SYSAUX space issues
It exists to
- Store all auxiliary database metadata related to Oracle options and features
such as

Option or Feature Schema Tablespace in 8, 8i or 9i
---------------------- ------------- ----------------------------
OLAP CWMLITE CWMLITE
Text CTXSYS DRSYS
Ultra Search WKSYS DRSYS
Intermedia and Spatial ORDSYS SYSTEM
Workspace Manager WMSYS
Data Mining DMSYS ODM

EM Repository SYSMAN OEM_REPOSITORY

Streams SYS (STREAM$_xxx) SYSTEM
LogMiner SYSTEM SYSTEM
Logical Standby SYSTEM SYSTEM
Statspack PERFSTAT User Specified
Job Scheduler SYS SYSTEM
- Reduce the number of tablespaces created for each of these when required
- Avoid SYSTEM tablespace fragmentation due to the possibility to install/
deinstall options
- Avoid the risk of corruptions and out-of-space situations of the SYSTEM
tablespace
- Reduced maintenance for the DBA
Characteristics
---------------
1. Not optional: it is mandatory in a 10g database and has the following mandato
ry
attributes: PERMANENT, READ WRITE, EXTENT MANAGEMENT LOCAL and
SEGMENT SPACE MANAGEMENT AUTO.
2. Requires the SYSDBA privilege to be created or maintained

3. Created automatically at

-> database creation :
-----------------
SQL> CREATE DATABASE DATAFILE 'system_datafiles_name' SIZE xxxM
SYSAUX DATAFILE 'sysaux_datafiles_name' SIZE xxxM
DEFAULT TEMPORARY TABLESPACE ... TEMPFILE ...
UNDO TABLESPACE ... DATAFILE ...;
Default size for SYSAUX is 210Mb.
-> database migrate to 10g :
-----------------------
The manual CREATE TABLESPACE SYSAUX can only be executed during the
migrate process after the following command:

SQL> STARTUP UPGRADE
SQL> CREATE TABLESPACE SYSAUX DATAFILE '...' SIZE xxxM
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
and before the execution of the u0902000.sql script where it states that
DOC
#######################################################################
The following statements will cause an "ORA-01722: invalid number"
error if the SYSAUX tablespace does not exist or is not ONLINE for READ
WRITE, PERMANENT, EXTENT MANAGEMENT LOCAL, and SEGMENT SPACE MANAGEMENT
AUTO.
The SYSAUX tablespace is used in 10g to consolidate data from a number of
tablespaces that were separate in prior releases.
Consult the Oracle10g Database Upgrade book for sizing estimates.
Create the SYSAUX tablespace, for example,
SQL> create tablespace SYSAUX datafile 'sysaux01.dbf'
size 50M reuse
extent management local
segment space management auto
online;
Then rerun the u0902000.sql script.
#######################################################################

4. Can be increased in size by adding new datafiles
or using ALTER DATABASE DATAFILE .... RESIZE


5. Forbidden operations
--------------------
-> DROP SYSAUX tablespace :
SQL> drop tablespace SYSAUX including contents and datafiles;
drop tablespace SYSAUX including contents and datafiles
*
ERROR at line 1:
ORA-13501: Cannot drop SYSAUX tablespace
-> RENAME SYSAUX tablespace :
SQL> alter tablespace SYSAUX rename to OPT_TBS;
alter tablespace SYSAUX rename to OPT_TBS
*
ERROR at line 1:
ORA-13502: Cannot rename SYSAUX tablespace
-> Set SYSAUX tablespace to READ ONLY :
SQL> alter tablesapce SYSAUX read only;
alter tablespace sysaux read only
*
ERROR at line 1:
ORA-13505: SYSAUX tablespace can not be made read only
-> Transport SYSAUX tablespace - this is because the SYSAUX tablespace
cannot be made read only. The tablespace however can be exported in
the standard way.
6. Transfer occupants from/to SYSAUX to/from another tablespace
---------------------------------
6.1 If an occupant of the tablespace SYSAUX takes too much space, you can
move it to another tablespace. Similarly a valid schema can be transferre
d
back to SYSAUX tablespace.
6.2 Find the right procedure to perform the transfer :
SQL> SELECT occupant_name, schema_name, move_procedure,
space_usage_kbytes
FROM v$sysaux_occupants
ORDER BY 1;
OCCUPANT_NAME SCHEMA_NAME MOVE_PROCEDURE SPACE
-------------- ------------------ --------------------------------- -----
AO SYS DBMS_AW.MOVE_AWMETA 0
EM SYSMAN emd_maintenance.move_em_tblspc 0
JOB_SCHEDULER SYS *** MOVE PROCEDURE NOT APPLICABLE ** 24
LOGMNR SYSTEM SYS.DBMS_LOGMNR_D.SET_TABLESPACE 864
LOGSTDBY SYSTEM SYS.DBMS_LOGSTDBY.SET_TABLESPACE 0
ODM DMSYS MOVE_ODM 0
ORDIM ORDSYS *** MOVE PROCEDURE NOT APPLICABLE *** 0
ORDIM/PLUGINS ORDPLUGINS *** MOVE PROCEDURE NOT APPLICABLE *** 0
ORDIM/SQLMM SI_INFORMTN_SCHEMA *** MOVE PROCEDURE NOT APPLICABLE *** 0
SDO MDSYS MDSYS.MOVE_SDO 0
STATSPACK PERFSTAT Use export/import (see export 0
parameter file spuexp.par)
STREAMS SYS 24
TEXT CTXSYS DRI_MOVE_CTXSYS 608
ULTRASEARCH WKSYS MOVE_WK 0
WM WMSYS DBMS_WM.move_proc 864
--> to transfer all Ultra Search related objects to SYSAUX:

6.3 Use the right procedure to perform the transfer:

SQL> exec SYS.DBMS_LOGMNR_D.SET_TABLESPACE('USERS');
PL/SQL procedure successfully completed.
After the transfer to USERS tablespace, the value reported above for
LOGMNR is set to 0 block within SYSAUX tablespace.
6.4 To transfer it back to SYSAUX, use :
SQL> exec SYS.DBMS_LOGMNR_D.SET_TABLESPACE('SYSAUX');
PL/SQL procedure successfully completed.

You might also like