Tablespace Fragmentation. specially in SYSTEM tablesapce.

Hi,
I am working on Oracle 11gR2 DB and AIX OS.
An database is having many tablespaces which are allocated to specific schemas. These schemas are functional from a long time. Data comes and goes all the time. The size of the tablespace has gone very high(than expected). We have removed(truncated) most of the unwanted tables and data from the schema and trying to resize the datafile, but we are not able to do it.
while checking with the below query :-
SELECT   df.tablespace_name "Tablespace",
       df.bytes / (1024 * 1024) "Size (MB)",
       SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
       Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",
       Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used"
  FROM dba_free_space fs,
       (SELECT tablespace_name,SUM(bytes) bytes
          FROM dba_data_files
         GROUP BY tablespace_name) df
WHERE fs.tablespace_name (+)  = df.tablespace_name
GROUP BY df.tablespace_name,df.bytes
UNION ALL
SELECT df.tablespace_name tspace,
       fs.bytes / (1024 * 1024),
       SUM(df.bytes_free) / (1024 * 1024),
       Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1),
       Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes)
  FROM dba_temp_files fs,
       (SELECT tablespace_name,bytes_free,bytes_used
          FROM v$temp_space_header
         GROUP BY tablespace_name,bytes_free,bytes_used) df
WHERE fs.tablespace_name (+)  = df.tablespace_name
GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
ORDER BY 4 DESC;
The output is :-
tablespace name         size_MB    free_space_MB     %free  %used
  SYSTEM                34256     28941.375        84            16
   SMD                      7975     2991.1875        38            62
.................N many other Here if i try to resize the SMD tablespace datafile to (7975-2991.1875) 4983 MB it does not allow me to do it.
Also the SYSTEM tablespace has gone so big but used space is very less.
I suspect that fragmentation is the problem here._
Please guide me what could i do in these case to reduce the space taken by the datafiles.
Thanks in advance.

Thanks for notifying......I have a misconception about it...both the queries giving almost same result.
but first query give you result at datafile level.
SQL> column tablespace_name format a10
SQL> column file_name format a32
SQL> column file_mb format 9999990
SQL> column hwm_mb format 9999990
SQL> column used_mb format 9999990
SQL> column shrnk_mb format 9999990
SQL>
SQL> break on report
SQL> compute sum of file_mb on report
SQL> compute sum of hwm_mb on report
SQL> compute sum of used_mb on report
SQL> compute sum of shrnk_mb on report
SQL>
SQL> select a.*
  2  , file_mb-hwm_mb shrnk_mb
  3  from (
  4  select /*+ rule */
  5  a.tablespace_name,
  6  a.file_name,
  7  a.bytes/1024/1024 file_mb,
  8  b.hwm*d.block_size/1024/1024 hwm_mb,
  9  b.used*d.block_size/1024/1024 used_mb
10  from
11  dba_data_files a,
12  (select file_id,max(block_id+blocks-1) hwm,sum(blocks) used
13  from dba_extents
14  group by file_id) b,
15  dba_tablespaces d
16  where a.file_id = b.file_id
17  and a.tablespace_name = d.tablespace_name
18  ) a
19  order by a.tablespace_name,a.file_name;
TABLESPACE FILE_NAME                         FILE_MB   HWM_MB  USED_MB SHRNK_MB
SYSAUX     C:\ORACLEXE\APP\ORACLE\ORADATA\X      710      673      672       37
           E\UNDOTBS1.DBF
SYSTEM     C:\ORACLEXE\APP\ORACLE\ORADATA\X      360      353      352        7
           E\SYSTEM.DBF
UNDOTBS1   C:\ORACLEXE\APP\ORACLE\ORADATA\X      260      258      257        2
           E\SYSAUX.DBF
USERS      C:\ORACLEXE\APP\ORACLE\ORADATA\X     6340     6017     6016      323
           E\USERS.DBF
TABLESPACE FILE_NAME                         FILE_MB   HWM_MB  USED_MB SHRNK_MB
sum                                             7670     7301     7296      369
SQL> SELECT /* + RULE */  df.tablespace_name "Tablespace",
  2         df.bytes / (1024 * 1024) "Size (MB)",
  3         SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
  4         Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",
  5         Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used"
  6    FROM dba_free_space fs,
  7         (SELECT tablespace_name,SUM(bytes) bytes
  8            FROM dba_data_files
  9           GROUP BY tablespace_name) df
10   WHERE fs.tablespace_name (+)  = df.tablespace_name
11   GROUP BY df.tablespace_name,df.bytes
12  UNION ALL
13  SELECT /* + RULE */ df.tablespace_name tspace,
14         fs.bytes / (1024 * 1024),
15         SUM(df.bytes_free) / (1024 * 1024),
16         Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1),
17         Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes)
18    FROM dba_temp_files fs,
19         (SELECT tablespace_name,bytes_free,bytes_used
20            FROM v$temp_space_header
21           GROUP BY tablespace_name,bytes_free,bytes_used) df
22   WHERE fs.tablespace_name (+)  = df.tablespace_name
23   GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
24   ORDER BY 4 DESC;
Tablespace                      Size (MB)  Free (MB)     % Free     % Used
TEMP                                   20         17         85         15
USERS                                6340   323.3125          5         95
SYSAUX                                710      37.25          5         95
SYSTEM                                360     7.3125          2         98
UNDOTBS1                              260     1.8125          1         99
SQL>

Similar Messages

  • How we find tablespace fragmentation and resolve this problem

    Hi,
    How we find tablespace fragmentation and resolve this in 10 G (R2) windows XP.
    Regards
    Faheem

    Hi,
    >>Are you using Dictionary Managed or Locally Managed Tablespaces...??
    In fact, there is no way to create a DMT if SYSTEM tablespace is LMT. So, what I said in my previous post "Unless the OP is using DMT ..." is impossible in Oracle 10g ...
    SQL> create tablespace tbs_test
      2      datafile '/u01/oradata/BDRPS/test01.dbf' size 5m
      3      extent management dictionary;
    create tablespace tbs_test
    ERROR at line 1:
    ORA-12913: Cannot create dictionary managed tablespace
    SQL> select extent_management from dba_tablespaces
      2  where tablespace_name='SYSTEM';
    EXTENT_MAN
    LOCALCheers
    Legatti

  • Tablespace fragmentation

    Hi All,
    How can I identify the tablespace is fragmented or not?
    If fragmented how can I resolve the issue while production database is up & running.
    Thanks in advance...

    REM     This script measures the fragmentation of free space
    REM     in all of the tablespaces in the database and scores them
    REM     according to an arbitrary index for comparison
    REM     
    REM               largest extent     100
    REM     FSFI = 100 * sqrt(------------------) * (-------------------------------)
    REM               sum of all extents sqrt(sqrt((number of extents)))
    REM     
    REM     FSFI - Free Space Fragmentation index
    REM     The largest possible FSFI (for an ideal single-file tablespace) is 100
    REM     As the number of extents increases, the FSFI rating drops slowly. As the size of
    REM     the largest extent drops, however, the FSFI rating drops rapidly.
    select          tablespace_name
    , file_id
    ,          sqrt(max(blocks)/sum(blocks)) *
              (100/sqrt(sqrt(count(blocks)))) fsfi
    from          dba_free_space
    group by     tablespace_name, file_id
    order by     1,2;
    You can move object to another tablespace and rebuild the associated indexes for tablespace fragmentation.
    Drop the old tablespace.
    Also you can go for export/import.
    Regards
    Asif Kabir

  • What is  tablespace fragmentation?

    hello all,
    please,give me more detail about tablespace fragmentation .i want to know when tablespace fragmentation occur? thanks all in advance for response.

    first thanks u and all for give me response and this wonderful link but i have a doubt which i want to ask ,when table is dropped,or truncated or raw of table is deleted then free extents is available for another request, if a request is made for an extent allocation that cannot be found in one free contiguous extent even though the total free space in the tablespace may be significantly larger than the requested size. is this a fragmentation problem?

  • Checking Tablespace Fragmentation...

    Folks,
    Can someone share a high-end script for Checking Tablespace Fragmentation that shows exact numbers/values?
    The one I have shows only yes or no..
    Pasting my script below:
    Prompt Fragmentation Level in the db
    Prompt
    TTitle left "*** Fragmentation Level in the db (As of:"xdate ") from mtdb" skip2
    SELECT dfsc.tablespace_name tablespace_name,
    DECODE (
    dfsc.percent_extents_coalesced,
    100,
    (DECODE (
    GREATEST ((SELECT COUNT (1)
    FROM dba_free_space dfs
    WHERE dfs.tablespace_name = dfsc.tablespace_name),
    1),
    1,
    'No Frag',
    'Fragmented'
    'Possible Honey Comb Frag'
    fragmentation_status
    FROM dba_free_space_coalesced dfsc
    ORDER BY dfsc.tablespace_name
    ttitle off
    results:
    TABLESPACE_NAME FRAGMENTATION_STATUS
    IIS_TABS1 No Frag
    IIS_TABS2 No Frag
    IIS_TABS3 Fragmented
    IIS_TABS4 No Frag
    IIS_TABS5 No Frag
    regards,
    Lily

    Can you explain what, exactly, you mean by "tablespace fragmentation"? Assuming you are on a recent version of Oracle and using locally managed tablespaces (LMT's), fragmentation in the sense of having a chunk of space on disk that cannot be reused because it is too small is all but impossible. Technically, it is still possible in a LMT with automatic rather than uniform extent allocation, but it is exceptionally difficult in practice to come up with such a scenario.
    Tablespace fragmentation was a potential problem in long-ago days when there were dictionary-managed tablespaces (DMT's) when individual objects could have different extent allocation policies and PCTINCREASE could be specified. The solution back then was to set INITIAL = NEXT = <<some reasonable constant>> and PCTINCREASE = 0 and simulate the uniform extent allocation option of LMTs.
    Justin

  • Best way to correct Tablespace fragmentation?

    Dear DBAs,
    The following query returns tablespace fragmentation:
    select
    tablespace_name,
    count(*) free_chunks,
    decode(
    round((max(bytes) / 1024000),2),
    null,0,
    round((max(bytes) / 1024000),2)) largest_chunk,
    nvl(round(sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)) )),2),
    0) fragmentation_index
    from
    sys.dba_free_space
    group by
    tablespace_name
    order by
    2 desc, 1;
    I have 3 tablespaces that are Locally Managed and suffer heavyt fragmentation. I just received the task of tuning this database and from what I could tell the fragmentation originated from a number of bad practices from past DBAs and also, some bizarre structures in certain tables.
    My question is: what would be the best way to correct tablespace fragmentation LMT? I'm thinking export - drop - import to reorganize all blocks within the tablespace?

    Alvaro wrote:
    Dear DBAs,
    The following query returns tablespace fragmentation:
    select
    tablespace_name,
    count(*) free_chunks,
    decode(
    round((max(bytes) / 1024000),2),
    null,0,
    round((max(bytes) / 1024000),2)) largest_chunk,
    nvl(round(sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)) )),2),
    0) fragmentation_index
    from
    sys.dba_free_space
    group by
    tablespace_name
    order by
    2 desc, 1;
    I have 3 tablespaces that are Locally Managed and suffer heavyt fragmentation. I just received the task of tuning this database and from what I could tell the fragmentation originated from a number of bad practices from past DBAs and also, some bizarre structures in certain tables.
    My question is: what would be the best way to correct tablespace fragmentation LMT? I'm thinking export - drop - import to reorganize all blocks within the tablespace?In addition to what everyone else notes is the unlikelihood of fragmentation, there may be implicit compaction and skew in your data distribution that could be impacted by export/import. For better or worse.
    What bad practices are you referring to? Sometimes practices are inappropriate, sometimes useless, sometimes perfectly understandable. If you don't know about the fragmentation issue, I wonder how well you judge practices. And yes, there are some really bad practices floating about.

  • What is the difference between Table & Tablespace Fragmentation

    What is the difference between Table Fragmentation & Tablespace Fragmentation.
    What causes Table Fragmentation and what cause Tablespace Fragmentation.
    How can we avoid Table Fragmentation & Tablespace Fragmentation.
    How can we fix already Fragmented Tables & Fragmented Tablespaces
    Thanks
    Naveen

    Unless you are using an exceptionally old version of Oracle or are still using dictionary managed tablespaces or are using some interesting definitions of "fragmentation", fragmentation is practically impossible in Oracle.
    Justin

  • Tablespace fragmentation problem

    All,
    I am working in Oracle 9i. Developers are facing some problem. Oracle is throwing ORA-1654 error. There is enough space in the tablespaces. To me it seems to be fragmentation problem. I found one query on some site and executed in my environment.
    SQL> select substr(ts.name, 1,10) TableSpace,to_char(f.file#,990) "file #",tf.blocks blocks,sum(f.length) free,to_char(count(*),9990) frags,max(f.length) bigst, to_char(min(f.length),999990) smllst,round(avg(f.length)) avg,to_char(sum(decode(sign(f.length-5), -1, f.length,0)),99990) dead from sys.fet$ f, sys.file$ tf, sys.ts$ ts where ts.ts# = f.ts# and ts.ts# = tf.ts# group by ts.name, f.file#, tf.blocks;
    TABLESPACE file BLOCKS FREE FRAGS BIGST SMLLST AVG DEAD
    GAP_ARC 7 15360 8239 108 6099 20 76 0
    GAP_BILD 8 256000 223804 3655 77909 5 61 0
    GAP_DATA 9 230400 48267 211 3937 5 229 0
    GAP_GEN 10 192000 86156 902 52178 1 96 3
    GAP_IMP 11 38400 37669 14 37399 10 2691 0
    GAP_INDEX 12 230400 96408 3557 506 1 27 5335
    GAP_INDEX 12 409600 96408 3557 506 1 27 5335
    GAP_INDEX 13 230400 56120 1611 495 2 35 2627
    GAP_INDEX 13 409600 56120 1611 495 2 35 2627
    GAP_ZNZL 14 1920 1919 50 515 10 38 0
    RBS 3 51200 30479 871 35 29 35 0
    RBS_BIG 4 76800 63929 157 43649 130 407 0
    SYSTEM 1 25600 25952 2 12976 12976 12976 0
    SYSTEM 2 25600 22728 20 11321 2 1136 12
    TEMP 5 64000 58279 252 25649 130 231 0
    TOOLS 6 6400 6384 1 6384 6384 6384 0
    16 Zeilen ausgewählt.
    From the output it seems GAP_INDEX has some fragmentation problem. Can somebody suggest, what the output means particularly the "DEAD" one.
    And also, how to do the fragmentation ??
    Thanks for help.
    Regards,
    Rajeev

    I haven't taken the time to study the query in depth but I think 'dead' is an attempt to identify free exents that are too small to be used.
    The original post leaves out some very important information such as the type of tablespace space allocation in use: dictionary vs local with auto-allocate or uniform extents.
    As one poster noted if you use locally managed tablespaces wtih uniform extents then free space fragmentation by definition cannot exist.
    With auto-allocate and dictionary mangement it can. Auto-allocate generally extents the time till a tablespace's free space becomes fragemented such that the space is not usuable and contains logic to reclaim via reuse but with the right combination of very small and very large objects the problem can still exist.
    Dictionary management is almost bound to lead to free space fragmentation conditions for an active system though the adoption of a proper extent sizing policy can help: initial = next with pctincrease = 0 for all objects in a tablespace and the extent sizes for the larger objects being an even multiple of the small object extent size.
    For auto-allocate and especially dictionary management when free space gets low the options are re-create the objects to consolidate all free space into a few large contiguous chunks or add another file. Sometimes you can relocate an object whose extents can then be reused by other objects. With uniform extents moving an object to another tablespace always creates fully reusable free space. Since objects should be where you want them the only real option then is to add free space is to add a file. Managing free space in a uniform extent environment then is genarally very straight forward.
    HTH -- Mark D Powell --

  • Removing Tablespace fragmentation in 10g

    i have a problem with a tablespace space that is highly fragmented . It's locally managed with PCT_INCREASE set to 0. How can i reduce the fragmentation in this tablepsace
    Free/Used Space Report :
    Tablespace                        Used MB    Free MB   Total MB  Pct. Free
    FRP_I01                            158556      44625     203181         22
    select PCT_INCREASE,EXTENT_MANAGEMENT,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces where TABLESPACE_NAME='FRP_I01';
    PCT_INCREASE EXTENT_MAN SEGMEN
               0 LOCAL      AUTO
    fragmentation report :
    select
      2  tablespace_name,
      3  count(*) free_chunks,
    decode(
      4    5  round((max(bytes) / 1024000),2),
      6  null,0,
      7  round((max(bytes) / 1024000),2)) largest_chunk,
      8  nvl(round(sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)) )),2),
      9  0) fragmentation_index
    10  from
    11  sys.dba_free_space
    12  group by tablespace_name
    13  having tablespace_name='FRP_I01'
    14  order by
    15  2 desc, 1;
    TABLESPACE_NAME                FREE_CHUNKS LARGEST_CHUNK FRAGMENTATION_INDEX
    FRP_I01                                201         11904               13.56
    SELECT   dfsc.tablespace_name tablespace_name,
      2           DECODE (
      3              dfsc.percent_extents_coalesced,
                100,
      4    5              (DECODE (
      6                  GREATEST ((SELECT COUNT (1)
      7                               FROM dba_free_space dfs
      8                              WHERE dfs.tablespace_name = dfsc.tablespace_name), 1),
      9                  1,
    10                  'No Frag',
    11                  'Bubble Frag'
    12               )
    13              ),
    14              'Possible Honey Comb Frag'
    15           )
    16                 fragmentation_status
    17      FROM dba_free_space_coalesced dfsc
    18  where dfsc.tablespace_name='FRP_I01'
    19  ORDER BY dfsc.tablespace_name;
    TABLESPACE_NAME                FRAGMENTATION_STATUS
    FRP_I01                        Bubble Frag

    yes, i know that. But as per my script this particular tablespace is fragmented and i want to know if some1 can help me out how to defragment it ?
    A 100% score indicates no fragmentation at all. Lesser scores verify the presence of fragmentation.The free chunks count column will tell you how many segments of free space are scattered throughout the tablespace.
    thanks in advance

  • Tablespace: PSAPTEMP # Tablespace files autoextend can cause file system overflow

    Hi All,
    We are seeing the above message after updating the kernel from 701 SP 125 to 720 SP 600.
    I have checked the data files that make up PSAPTEMP and none are set to auto extend so I am confused as to what it is complaining about.
    Tablespace name
    Size(MB)
    Free(MB)
    Used(%)
    Autoextend
    Total size(MB)
    Total free space(MB)
    Total used (%)
    #Files
    #Segments
    #Extents
    Status
    Contents
    Compression
    PSAPTEMP
    11,264.00
    11,262.00
    0
    NO
    11,264.00
    11,262.00
    0
    6
    0
    0
    ONLINE
    TEMPORARY
    DISABLED
    File name
    File Id
    Tablespace name
    Size(MB)
    #Blocks
    Status
    Rel. file number
    Autoextensible
    Maxsize(MB)
    Maxblocks
    Increment by
    User size(MB)
    User blocks
    /oracle/SID/sapdata1/temp_1/temp.data1
    1
    PSAPTEMP
    2,048.00
    262,144
    AVAILABLE
    1
    NO
    0
    0
    0
    2,047.00
    262,016
    /oracle/SID/sapdata1/temp_2/temp.data2
    2
    PSAPTEMP
    2,048.00
    262,144
    AVAILABLE
    2
    NO
    0
    0
    0
    2,047.00
    262,016
    /oracle/SID/sapdata1/temp_3/temp.data3
    3
    PSAPTEMP
    2,048.00
    262,144
    AVAILABLE
    3
    NO
    0
    0
    0
    2,047.00
    262,016
    /oracle/SID/sapdata3/temp_4/temp.data4
    4
    PSAPTEMP
    3,072.00
    393,216
    AVAILABLE
    4
    NO
    0
    0
    0
    3,071.00
    393,088
    /oracle/SID/sapdata2/temp_5/temp.data5
    5
    PSAPTEMP
    1,024.00
    131,072
    AVAILABLE
    5
    NO
    0
    0
    0
    1,023.00
    130,944
    /oracle/SID/sapdata2/temp_6/temp.data6
    6
    PSAPTEMP
    1,024.00
    131,072
    AVAILABLE
    6
    NO
    0
    0
    0
    1,023.00
    130,944
    Any ideas how to resolve this or is it a bug?
    Thanks
    Craig

    Hi Craig,
    Deactivating the alert could be the latest solution, but you should first check how the tempfiles are setup. If they are set as sparse files they might not use all the allocated space at FS level, but might grow up to it and cause an overflow...
    To deactivate that behavior you should copy temp files with a specific cp option (--sparse=never) to deactivate the sparse attribute as explained in the here under notes (the 2nd one is for 11g only thus not valid for you).
    Regards
    548221 - Temporary Files are created as sparse files
    Oracle creates files of temporary tablespaces as sparse files.
    'Sparse' is a special property a file in Unix operating systems can have. Sparse files are files that can dynamically grow and shrink depending on their content. So many sparse files can use a common pool of free disk space. Also the creation of a sparse file is much faster than creation of a normal file.
    Problems can occur if sparse files on the same disk grow in parallel and there is not sufficient free disk space for all to extend.
    Usage of sparse files is not a bug. Therefore there is no possibility to tell Oracle not to use sparse files for the temporary tablespace if the operating system offers sparse file functionality.
    1864212 - Forcing complete space allocation for temp files
    By default, temp files are not initialized when the file is created and therefore the disk space is not pre-allocated in the file system.

  • Backup everything except the system tablespace

    Is there a way to backup everything except the system tablespace without having to specify every individual tablespace?
    version is 10.1.0.5 on HP-UX itanium.
    The reason for this is the database was upgraded from 7.3.4->8i->10.1.0.5 and we are now migrating to using RMAN instead of user managed backups however we have encountered a bug when backing up index blocks in the system tablesapce this only impacts compressed backupsets so If I can exlude the system tablespace I can run two backups one uncompressed that captures the system tablespace then another that captures everything else. I'd really like to avoid specifying the tablespaces in a script as it then introduces the possibility that a new tablespace is added and isn't included in the backups.

    Unfortunatly this database is used by a third party application and the aplpication vendor only supports 10.1.0.5 at the moment, plans are to upgrade next year and tidy up the number of tablespaces at the same time.
    looks like I'll have to backup the system tablespace uncompressed and then all the other tablespaces as a compressed backupset and setup an alert on files not backed up.

  • How to find Fragmentation of tables and tablespaces in oracle 8i

    Hi,
    How can i measure the fragmentation of Tables and Tablespaces in oracle 8i.
    Do any one have any handy script to find the same.
    What are the attributes to be determined to do health checkup of a database.

    how many such empty blocks are there in the table and of what size.Again Tom Kyte reference :
    http://asktom.oracle.com/pls/ask/f?p=4950:8:7760471022221195640::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:231414051079
    For tablespace, fragmentation is the regular termAbout tablespace, the link from post above can help.
    Nicolas.

  • SYSTEM Tablespace issue (10.2.0.1 database)

    Hi ,
    Oracle database 10.2.0.1 (upgraded from 8.1.7.0 via 8.1.7.4)...successfully upgraded
    Now when we open dbcontrol, we are getting alerts regarding the Tablespace.
    It shows two critical alert messages as below :-
    1) Tablesapace SYSTEM (dictionary managed) is 95.16 % full
    2) 1 segment in SYSTEM tablespace is unable to extend.
    Now how to deal with this type of issues ?
    Can we extend the size of datafile of SYSTEM Tablespace which is dictionary managed ? or can we add another new datafile to system tablespace ? what is appropriate solution ?SYSTEM Tablespace
    How to solve the point no. (2) as the TS is dictionary managed ?
    With Regards

    hi ,
    Plz add the datafile to the system tablespace tp increase its size , and the conver the system tablespace from dictionary managed to local.
    To Change SYSTEM tablespaces to locally managed follow the below procedures:
    Before the SYSTEM tablespace can be migrated to locally managed format, you should ensure the following:
    The database has a default temporary tablespace which is not SYSTEM
    There are not any rollback segments in dictionary managed tablespaces
    There is at least one online rollback segment in a locally managed tablespace, or an undo tablespace (if using automatic undo management mode) should be online.
    All tablespaces other than the tablespace containing the undo space (undo tablespace or the tablespace containing the rollback segment) and the default temporary tablespace are in read-only mode.
    There is a complete backup of the system.
    The system is in restricted mode.
    Notr, that we already have an UNDO Tablespace. The following query determines whether the SYSTEM tablespace is locally managed:
    SQL> SELECT ts# FROM ts$ WHERE ts# = 0 AND bitmapped <> 0;
    If 0 rows are returned, then the SYSTEM tablespace is dictionary managed. Otherwise, the SYSTEM tablespace is locally managed.
    Steps to change SYSTEM tablespaces to locally managed
    SQL> shutdown immediate
    SQL> startup restrict
    SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
    ERROR at line 1:
    ORA-10644: SYSTEM tablespace cannot be default temporary tablespace
    ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
    ORA-06512: at line 1
    SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
    SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
    ERROR at line 1:
    ORA-10647: Tablespace other than SYSTEM, UNDO, TEMP not
    found in read only mode
    ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
    ORA-06512: at line 1
    SQL> select tablespace_name from dba_tablespaces;
    TABLESPACE_NAME
    SYSTEM
    TEMP
    USERS
    TAB
    IDX
    SYSAUX
    UNDO
    SQL> alter tablespace USERS read only;
    SQL> alter tablespace TAB read only;
    SQL> alter tablespace IDX read only;
    SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
    ERROR at line 1:
    ORA-10648: Tablespace SYSAUX is not offline
    ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 227
    ORA-06512: at line 1
    SQL> alter tablespace SYSAUX offline;
    SQL> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('SYSTEM');
    PL/SQL procedure successfully completed.
    Regards,
    Mohd Mehraj Hussain
    http://mehrajdba.wordpress.com

  • Threshold fragmentation in a tablespace

    Hi all,
    How can I identify the threshold fragmentation in a tablespace in oracle 9i and then how can I eliminate it?
    Thanks in advance.
    Deep

    A tablespace is fragmented when enough space exists in the tablespace to satisfy
    space request but it is spread across smaller pieces of free space and therefore
    cannot be used to satisfy the request.
    Here are some symptoms that may indicate fragmentation in a database:
    - any ORA errors regarding allocation of extents or space(i.e. ora-1547, ora-1562)
    - DBA_FREE_SPACE shows a lot of free space left in a tablespace, but users
    receive space errors
    Use locally managed tablespaces with uniform extent size and say good bye to Tablespace fragmentation.

  • Fragmentation in tablespace in oracle 9i

    Hi All,
    We have oracle 9.2.0.8 installed in solaris 9, database size is 1.5 TB, we are looking for the tablespaces which are suffering from the fragmentation.
    We have locally manged tablesapaces in the database. so can you please tell me, is there any tablespace fragmentation in the locally managed tablespace in oracle 9i, and if it is there than how to relove the situation.?
    thanks in advance

    If you mean by fragmentation, a number of free space areas in the data files - sometimes called honeycombing, this script will show them to you.
    SELECT  'free space'      owner,
            ' '               object,
            ' '               obj_type,
            f.file_name,
            s.file_id,
            s.block_id,
            s.blocks,
            s.bytes/1048576   mbytes
      FROM  dba_free_space s,
            dba_data_files f
    WHERE  s.file_id = &file_id
       AND  s.file_id = f.file_id
    UNION
    SELECT  owner,
            segment_name,
            DECODE(segment_type, 'TABLE',          'T',
                                 'INDEX',          'I',
                                 'ROLLBACK',       'RB',
                                 'CACHE',          'CH',
                                 'CLUSTER',        'CL',
                                 'LOBINDEX',       'LI',
                                 'LOBSEGMENT',     'LS',
                                 'TEMPORARY',      'TY',
                                 'NESTED TABLE',   'NT',
                                 'TYPE2 UNDO',     'U2',
                                 'TABLE PARTITION','TP',
                                 'INDEX PARTITION','IP', '?'),
            f.file_name,
            s.file_id,
            s.block_id,
            s.blocks,
            s.bytes/1048576
      FROM  dba_extents s,
            dba_data_files f
    WHERE  s.file_id = &file_id
       AND  s.file_id = f.file_id
    ORDER
        BY  file_id,
            block_id
    However, when you look at the report you will see that in a locally managed tablespace, all of the free space 'chunks' are all 8 blocks, or a multiple of 8 blocks. This means that all of these free space chunks are able to be (re)used. And, they will be used. There is no need to do anything unless there is a pressing need to give disk back to the OS.

Maybe you are looking for

  • Which fico plan to order

    I know CreditKarma is Fako score , but why would my score drop 23pts when my opensky secured card just landed on my report july1? my util is only at 12% and opensky doesnt do a hardpull on my credit...im going to breakdown and order the myfico monito

  • Using more than one computer...

    I've been trying to wrap my head around syncing using more than one computer and want to see if I have it right. Obviously the easiest arrangement is to have one computer and one iphone (and if you want, one mobileme acct) and keep them in sync in al

  • Trying to update my itunes and its saying f drive not found

    i have itunes and trying to upgrade it cause i just got 4s, when updating it says f drive not found.  i dont even have a f drive.  please help!

  • SQL+-MULTI TABLE QUERY PROBLEM

    HAI ALL, ANY SUGGESTION PLEASE? SUB: SQL+-MULTI TABLE QUERY PROBLEM SQL+ QUERY GIVEN: SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE, HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE, DLC_POLYMORPHS_NORMAL_VALUE FROM PA

  • SQLLoader Issue

    Hi , I am trying to load a flat file by sqlloader My database is oracle 11g on unix server. In my control file for the load is specified the character set to CHARACTERSET UTF8 So the following data got converted to e.g Beyoncé > Beyonc� I then change