Shrinking the SYSTEM tablespace in Oracle

datafileoracleoracle-11g-r2shrink

Our SYSTEM tablespace grew out of control because of the SYS.AUD$ table.

We have truncated SYS.AUD$ but the datafile is still very big (~30G).

Resize doesn't work because the file contains used data beyond requested RESIZE value

What should I do here?

Here's our version information:

  • Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
  • PL/SQL Release 11.2.0.1.0 – Production
  • CORE 11.2.0.1.0 Production
  • TNS for 64-bit Windows: Version 11.2.0.1.0 – Production
  • NLSRTL Version 11.2.0.1.0 – Production

Best Answer

Query the DBA_EXTENTS view to see what objects are present towards the end of the data files. It is possible that they are not system objects, or are system objects which can be safely modified so that they are towards the beginning of the files.

However I suspect that you have a big problem here -- you may be looking at creating a new database and moving all your user objects to that.