Posts

Showing posts with the label datafile

Correct size for datafile. Part 01

In this example we lost one extent (128M) because oracle uses in  locally managed tablespaces with a UNIFORM extent size  at least 64K per datafile  for Metadata Blocks . create   tablespace  TBS_TEST_BAD datafile   '/oradata/TEST/lm02.dbf'   size   524288 K   -- <-- 512M extent   management   local   uniform   size   128 M; Tablespace                          Size  MB    Free MB    Used MB Used Pct ------------------------------ ---------- ---------- ---------- -------- TBS_TEST_BAD                           512          384          128   25  % Then datafile has to be  a multiple of their extent size + 64K. create tablespace TBS_TEST datafile ' /oradata/TEST/lm01.dbf ' size 524352 K   -- <-- 512M  + 64K extent management local uniform size 128 M; Tablespace                         Size MB    Free MB    Used MB Used Pct ------------------------------ ---------- ---------- ---------- -------- TBS_TEST_GOOD

Summary of Tablespace

The following script allows us: Used percent, free space Details and properties Segments inside tablespaces Statistics of segments Statistics of IO per datafiles Datafiles of tablespace Quotas Script: view        : tbsinfo.sql download : tbsinfo.sql Example: Tablespace Name : DATACCSL02 --- Tablespaces Tablespace                         Size MB    Free MB    Used MB Used Pct ------------------------------ ---------- ---------- ---------- -------- DATACCSL02                          49158       48256         902 1.83 % Status    Logging    Extent Man Allocation ASSM    Next Extent KB Contents   Block Size --------- --------- ---------- ---------- ------ -------------- --------- ---------- ONLINE     LOGGING    LOCAL       UNIFORM      AUTO            131072 PERMANENT        8192 --- Quotas User                           Used  Quota ------------------------ ---------- --------------- UCS                             896 UNLI