Fragmentation of Tablespace - Help

We are dealing with a database of size 30 GB, which
has become very much fragmented. The Fragmentation
Report of the tablespace indicates that the largest single
extent that can be allocated is 116,000 with the other
segments mostly much smaller. Where-as the total blocks
available in the User tablespace is 3,301,373.
On querying V$SGASTAT, we find the free memory size
to be more than 90,000,000 Bytes.
We shall be pleased if any one may suggest a process
to defragment this tablespace.
Thank you -
Prabir Sen.

93469, to answer some of your questions:
1- You need to determine if the new tablespace should be locally managed using uniform extents or autoallocate. The answer should probably be based on how much variation exists between the current object sizes (used allocation). If you have a lot of very small tables and a few large one then autoallocate may be a better choice that uniform extents.
2- Why use three files if one will do? You should have a file management policy about file sizes and allocations so you should follow it.
3- The best way to answer this question is to try the import and find out. There are some imp/exp bugs in 8.1 but since your tablespace names will match you will avoid the only one that comes to mind. Tables with LOB objects imported into a db where the target tablespace does not exist so that the table defaults to the owner default tablespace will fair if the LOB segment tablespace points to a non-existing tablespace since Oracle development failed to default it also. But if you do not have LOB segments this is not an issue. Come to think of it I do not think you can import a table with a LOB table into an autoallocate tablespace in version 8.1.
HTH -- Mark D Powell --

Similar Messages

  • Fragmentation in tablespace

    can anyone say me how to find that the tablespace is undergoing fragmentation.please say me the ways o find out whether the tablespace is undergoing fragmentation

    Tablespace fragmentation query:
    select total.tablespace_name tsname,
    count(free.bytes) nfrags,
    nvl(max(free.bytes)/1024,0) mxfrag,
    total.bytes/1024 totsiz,
    nvl(sum(free.bytes)/1024,0) avasiz,
    (1-nvl(sum(free.bytes),0)/total.bytes)*100 pctusd
    from dba_data_files total,
    dba_free_space free
    where total.tablespace_name = free.tablespace_name(+)
    and total.file_id=free.file_id(+)
    group by total.tablespace_name,
    total.bytes;
    NFRAGS: number of fragmentation in tablespace where there are BYTES amount of free space between extents.
    MXFRAG: the maximum size of free space between extents
    This only gives you an overall info on space allocation. If you want to know about read/write and throughput of your tablespace use v$filestat. So the higher number in NFRAGS means more frangmenations.
    HTH
    Girish Sharma

  • Bounded-Task-Flow Page Fragment Control Flow Help

    jDeveloper: 11.1.1.0.2
    I am having an issue trying to figure out the correct way to use control flow cases between a bounded-task-flow with page fragments and an unbounded-task-flow page. We have taken the approach in our application to have a few shell / container pages to host bounded-task-flows made up of page fragments to facilitate re-usability and to speed up development. There are 4 or 5 shell pages on the applications unbounded-task-flow. As of now, we have about 20 page fragments that are implemented as bounded-task-flows. These fragments don't do much now, meaning there is only a single fragment in each bounded-task-flow. The issue I am having is trying to invoke a control flow navigation action from one of the fragments to load a different shell page.
    For Example, shellPage1.jspx contains fragment-flow-1 as a region. In my adfc-config.xml I have shellPage1.jspx and shellPage2.jspx, with control flow cases "toShell1" and "toShell2" respectively connecting the two pages. I have a link's action bound to the "toShell2" within the fragment that makes up fragment-flow-1. When the application is run, shellPage1.jspx and its fragment are displayed. But clicking on the link in the fragment ("toShell2") does absolutely nothing. It does not navigate me to the shellPage2.jspx as expected. What am I doing wrong here or do not understand?
    If the fragment is included as a JSP include, and not a bounded task flow include, everything works as expected. This is not desirable as we then need to copy the fragment's pageDef into the shellPage's pageDef to get the DataControls to function.
    If the faces-config.xml is used instead, and a JSF navigation case is used, it will also work as expected. This is not desirable because we really don't want to be mixing adcf-config and faces-config.
    So I am really stumped here.... Thanks in advance!

    Hi there:
    In your case, the adfc-config.xml has the control flow case between shell pages. And the task-flow-N.xml or your-task-flow.xml for each page fragment by default doesn't inherit control flow case from their containing shell page. In your case, in the page fragment task-flow.xml, you should add a "Parent Action" to flow to shell page2 for example. The outcome of "Parent Action" would be "toShell2" if calling from ShellPage1 page fragment.
    Is this 'Correct' or 'Helpful' for you? Please mark it as so if it does.
    Good luck,
    Alex

  • 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.

  • Local Management of Tablespace - Help

    We are using oracle 8i std edition on solaris. We want to create a locally
    managed tablespace for a particular schema. The objects of this schema
    will be imported every day from the same schema on another same database server.
    The existing schema tablespace is locally managed with system allocation type.
    1.We want to know what are the points to be kept in mind while creating a locally
    managed tablespace in the new db.
    2. Should the tablespace have a single datafile or more than one(The existing one has
    3 datafiles)? Which one is better? (There will be no activity on this new db as it is
    for standby only. If the existing one fails, this db will be used.
    4. Since we are going to export from the existing one and import into the new db schema
    every day ( the schema in the new db will be dropped and recreated daily before import),
    will there be any problems that we will encounter by doing so?
    Please let me know all the information so that we do not face any problem after
    implementing this.
    Note: Currently the failover schema tablespace is dictionary managed and we plan to
    entirely drop this tablespace and create a new one by the same name but locally managed
    this time. So what steps to be taken while dropping the tablespace and creating a new one
    by the same name? Will there be any problems because of this? Is a db restart required
    after this? Kindly enlist the points and steps.
    We appreciate your immediate help.

    93469, to answer some of your questions:
    1- You need to determine if the new tablespace should be locally managed using uniform extents or autoallocate. The answer should probably be based on how much variation exists between the current object sizes (used allocation). If you have a lot of very small tables and a few large one then autoallocate may be a better choice that uniform extents.
    2- Why use three files if one will do? You should have a file management policy about file sizes and allocations so you should follow it.
    3- The best way to answer this question is to try the import and find out. There are some imp/exp bugs in 8.1 but since your tablespace names will match you will avoid the only one that comes to mind. Tables with LOB objects imported into a db where the target tablespace does not exist so that the table defaults to the owner default tablespace will fair if the LOB segment tablespace points to a non-existing tablespace since Oracle development failed to default it also. But if you do not have LOB segments this is not an issue. Come to think of it I do not think you can import a table with a LOB table into an autoallocate tablespace in version 8.1.
    HTH -- Mark D Powell --

  • Help - Itunes plays all music fragmented/chopped up/mangled suddenly.

    I've had this problem happen a couple times already. All the audio/movie files play properly. Then all of a sudden itunes won't play audio clearly. The sound is all chopped and fragmented. It sounds like choppy cell phone service or that the audio is being played through a fan or something.
    In the past I've always reinstalled my itunes and everything was fine. This time I tried that a couple times and it doesn't change anything. I get the same old choppy/fragmented sound. Help me get my itunes working again. (I've got windows XP OS, all the updated drivers & windows updates, aswell as all my active x updates. - what else is there?) (FYI I also run a 30 GB ipod photo from it.)
    Any help would be appreciated in me getting my itunes back to playing properly and clearly. Any ideas why this keeps happening? I'm not aware of any significant changes to my PC or file set up to cause the change.
    thanks.

    hi Skippy!
    let's try working through the possibilities in this document. if you've got an itunes version 5.0.x or 6.0.x, you'll need to check the QT 7 settings:
    iTunes and QuickTime for Windows: Songs and other audio don't play correctly
    love, b

  • Problem redering h:outputText tag on a jsp fragment

    Hello to all... I'm trying to understand and use this new technology and I have encountered a problem that I cannot find any documentation as how to solve it. First I have my welcome.jsp page that I am using to call my fragment:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <f:view>
                <h1><h:outputText value="Java Server Faces" /></h1>
                <f:subview id="banner">
                    <c:import url="/banner.jsp"/>
                </f:subview>
            </f:view>
        </body>
    </html>then I have my jsp fragment, banner.jsp:
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
        <f:loadBundle basename="com.gm.gsip.messages" var="msgs"/>
        <table border="1">
            <tr>
                <td> <h:outputText value="#{msgs.hour}"/> � </td>
                <td> <h:outputText value="#{msgs.hour1}"/> �</td>
                <td> <h:outputText value="#{msgs.hour2}"/>� </td>
                <td> <h:outputText value="#{msgs.hour3}"/> �</td>
                <td> <h:outputText value="#{msgs.hour4}"/>� </td>
                <td> <h:outputText value="#{msgs.hour5}"/> �</td>
                <td> <h:outputText value="#{msgs.hour6}" /> �</td>
                <td> <h:outputText value="#{msgs.hour7}" /> �</td>
                <td> <h:outputText value="#{msgs.total}" />� </td>
            </tr>
        </table>My problem is that the <h:outputText> tag is rendering the values outside the table. This is what gets displayed:
    Java Server Faces
    Hour1234567TOTAL
    If I copy/paste the table tags (including the <h:outputText> tags) on the main jip, it renders without any problem:
    Java Server Faces
    Hour 1 2 3 4 5 6 7 TOTAL
    I'm guessing that I might be missing some other jsf tag inside the jsp fragment. Any help will be greatly appreciated.
    -thanks
    Rolando

    I can suggest you with the following solutions
    1. try having <%out.flush();%> before and after c:import
    2. try with jsp:include with flush=true
    Can you reply back with which one works? I didnt try out both of them
    Thanks

  • Table and index in the same tablespace

    I have a table and its associated indexes all in one tablespace. Now, will creating a separate tablespace just for the indexes and drop and recreating the indexes the table has in the new tablespace help ???
    Thanks

    In all probability, no. This may have some housekeeping/ recovery benefits but it is very unlikely to have performance benefits. Most modern disk arrays are configured so that data access is spread pretty evenly across all the spindles. If your disk is configured such that you have "hot" and "cold" disks, and if you can move the index to a different tablespace that can be placed on one of the "cold" disks, this will tend to balance out disk I/O and may improve performance.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • ORA-016553: unable to extend table LDS1002.AL_LANGTEXT by 128 in tablespace

    Hi All,
    I've encoutered the following error in BODI when trying to save a file format:
    Error: Error when saving file format <name=CTIN_TEST>
    Cannot save <Text> for repository objet <Language Object CTIN_TEST>, Additional database information: Oracle <DSD1> error message for operation <OCIStmtExecute>: ORA-016535l
    After deleting another sample file format, I was able to save a few file formats before being prompted with the error again.
    Any idea?
    Thanks.

    Yes, the issue is with tablespace. Extending tablespace helps!

  • Fragmentation in Undo TBS

    Hi all experts,
    I want to know if found fragmentation in undo tablespace.
    Is it recommaned to treat it the same way as usual permanent non system fragmented TBSs.
    i.e. do fragmentation
    I wonder if temp/undo tbs needs to be defragmented.
    Looking for your kind and professional advices and references.
    Thanks

    Being Locally Managed, TEMP and UNDO are self-managed by Oracle.
    I also wonder if you are "de-fragmenting" other tablespaces. If they are Locally Managed and Allocation_Type is either UNIFORM or AUTO, you do not need to "de-fragment" them. If using UNIFORM, set the appropriate Extent Size when you create the Tablespace.
    If your Tablespace has been converted from Dictionary Managed to Locally Managed, the Extent Management may appear as "USER" -- in which case you have odd-sized extents brought forward from DMT. Again, "fragmentation" is not an issue once they are Locally Managed.
    You could consider rebuilding the tablespaces as LMT with UNIFORM or AUTO when you get an opportunity. (Obviously : TEST, TEST , TEST and measure the effort and downtime -- it may not be justifiable to even expend that effort).
    Hemant K Chitale

  • Fragmented volume directory

    Ran TechTool Pro 7 suite of tests and found no problems. When I tried to optimize the drive, it was not allowed. Message says the volume directory is fragmented. Please help.
    OS X 10.9.3

    Contact Tech Tool tech support for assistance.
    The best tool for a fragmented director is Disk Warrior. With OS X there is no need to defragment (optimize) a hard drive unless it's very full with little space left on the drive - under 5 GBs of free space. If you must defragment your drive it's much better to do this instead;
    Defragmentation
    There's little need for defragmenting the hard drive except when trying to install Boot Camp on a fragmented drive. But you don't need to buy third-party software. All you need is a spare external hard drive and Carbon Copy Cloner.
    Cheap and Easy Defragmentation
    You will have to backup your OS X partition to an external drive, boot from the external drive, use Disk Utility to repartition and reformat your hard drive back to a single volume, then restore your backup to the internal hard drive. You will use Carbon Copy Cloner to create the backup and to restore it.
      1. Get an empty external hard drive and clone your internal drive to the
           external one.
      2. Boot from the external hard drive.
      3. Erase the internal hard drive.
      4. Restore the external clone to the internal hard drive.
    Clone the internal drive to the external drive
      1. Open Carbon Copy Cloner.
      2. Select the Source volume from the left side dropdown menu.
      3. Select the Destination volume from the left side dropdown menu.
      4. Be sure the Block Copy button is not depressed or is ghosted.
      5. Click on the Clone button.
    Destination means the external backup drive. Source means the internal startup drive.
    Restart the computer and after the chime press and hold down the OPTION key until the boot manager appears.  Select the icon for the external drive and click on the upward pointing arrow button.
    After startup do the following:
    Erase internal hard drive
      1. Open Disk Utility in your Utilities folder.
      2. After DU loads select your internal hard drive (this is the entry with the
           mfgr.'s ID and size) from the left side list. Note the SMART status of the
           drive in DU's status area.  If it does not say "Verified" then the drive is
           failing or has failed and will need replacing.  SMART info will not be
           reported  on external drives. Otherwise, click on the Partition tab in the
           DU main window.
      3. Under the Volume Scheme heading set the number of partitions from the
           drop down menu to one. Set the format type to Mac OS Extended
           (Journaled.) Click on the Options button, set the partition scheme to
           GUID then click on the OK button. Click on the Partition button and wait
           until the process has completed.
    Restore the clone to the internal hard drive
      1. Open Carbon Copy Cloner.
      2. Select the Source volume from the left side dropdown menu.
      3. Select the Destination volume from the left side dropdown menu.
      4. Be sure the Block Copy button is not selected or is ghosted.
      5. Click on the Clone button.
    Destination means the internal hard drive. Source means the external startup drive.
    Note that the Source and Destination drives are swapped for this last procedure.

  • Tablespace Datafile Resize ORA-03297

    Hi,
    In one of our tablespace constituting 4 datafiles, has got some data which is
    as follows :
    SEGMENT_NAME SEGMENT_TYPE
    SYS_C004044 INDEX
    SYS_C004315 INDEX
    PROJECTRELEASE_INDEX1 INDEX
    SYS_C0019289 INDEX
    XAK1WBSHIERARCHY INDEX
    SYS_IL0000033038C00047$$ LOBINDEX
    SYS_IL0000033086C00013$$ LOBINDEX
    SYS_IL0000033305C00013$$ LOBINDEX
    SYS_IL0000033431C00005$$ LOBINDEX
    SYS_IL0000033487C00006$$ LOBINDEX
    SYS_IL0000033492C00002$$ LOBINDEX
    SYS_IL0000033065C00009$$ LOBINDEX
    SYS_IL0000033427C00006$$ LOBINDEX
    SYS_IL0000033305C00014$$ LOBINDEX
    SYS_IL0000033110C00015$$ LOBINDEX
    SYS_IL0000033104C00014$$ LOBINDEX
    SYS_LOB0000033038C00047$$ LOBSEGMENT
    SYS_LOB0000033427C00006$$ LOBSEGMENT
    SYS_LOB0000033065C00009$$ LOBSEGMENT
    SYS_LOB0000033492C00002$$ LOBSEGMENT
    SYS_LOB0000033487C00006$$ LOBSEGMENT
    SYS_LOB0000033431C00005$$ LOBSEGMENT
    SYS_LOB0000033305C00014$$ LOBSEGMENT
    SYS_LOB0000033086C00013$$ LOBSEGMENT
    SYS_LOB0000033104C00014$$ LOBSEGMENT
    SYS_LOB0000033110C00015$$ LOBSEGMENT
    SYS_LOB0000033305C00013$$ LOBSEGMENT
    FORUMMESSAGE_H TABLE
    SITEADMIN TABLE
    We can move these indexes to different tablespaces, but since these tables have columns with LONG datatypes, we can't move these tables. But we can export the data, drop these tables and import the data in different tabelspaces. But for these lobsegment, how can I move these segments. I believe these got created as a result of indexing of LOB columns. The sizes of these datafiles of this tablespace is in terms of GBs, and I want to reduce the sizes of the same, therefore I tried to use resize command of alter database datafile '***' resize **m, but it thrown ora-03297 error message. I thought it has raised may because of fragmentation of tablespace. I found the blocks were free_space is available using dba_free_space. But after coalescing the tablespace, still I got same no of records in free space. That means the tablespace is not getting coalesced. What is the reason for this. Plz let me know why tablespace data is not getting moved so as to enable me to resize the datafiles.
    Thanx,
    Kamlesh C

    In older versions of Oracle on Windows platforms if you accepted the default names for your datafiles .ora was used. I think beginning in 8.1.x .dbf became the default, which was more like the standards used on other operating systems.
    As already pointed out .ora is most commonly used for configuration files like init.ora.

  • Create index partition in the table partition tablespace

    Hello,
    I am running a custom job that
    * Creates a tablespace daily
    * Creates the daily table partition in the tablespace created
    * Drops the tablepartition X days old
    * Drops the tablespace for that partition on X+1 day.
    The above job runs perfectly, but 'm having issues with managing the indexes for these partitioned tables. In the old database (10g - Single Node), all the partitions/indexes existed in one BIG tablespace and when I imported the table creation script into the new database, I modified all the table partitions & indexes to go into their respective tablespace.
    Eg:
    Table_name........Partition_name.....................Index_Part_name..........................Tablespace_name
    ============...================............====================...........=================
    TABL1...................TABL1_2012_07_16............TABL1_IDX_2012_07_16............TBS_2012_07_16
    TABL1...................TABL1_2012_07_15............TABL1_IDX_2012_07_15............TBS_2012_07_15
    But now when the job runs, it creates the index into the default tablespace TBS_DATA.
    Table_name........Partition_name.....................Index_Part_name..........................Tablespace_name
    ============...================.............====================...........=================
    TABL1...................TABL1_2012_08_16............TABL1_IDX_2012_08_16............TBS_DATA
    TABL1...................TABL1_2012_08_15............TABL1_IDX_2012_08_15............TBS_DATA
    I can issue alter index rebuild to move the indexes to its default tablespace, but how can I ensure that the index gets created in its designated tablespace?
    NOTE - the partition/tablespace management job that I run only creates the table partition and not the index.
    The new env is a 2-Node 11gR2 RAC cluster on Linux x86_64.
    Thanks in advance,
    aBBy.

    Excerpt from the job -
    This creates the partition into the new tablespace.
    v_sql_new_part := 'alter table '||tab_owner||'.'||tab_name||' add partition '||v_new_part_nm||'
    values less than (to_date('''||v_new_part_dt_formatted||''',''DD-MON-YYYY'')) tablespace '||part_tbs;
    execute immediate v_sql_new_part;New tablespace for new partition - because this is a 10T database and having multiple tablespaces helps with backup/recovery.
    Thanks,
    aBBy.

  • ORA-01659: unable to allocate MINEXTENTS beyond 13 in tablespace TBSP1

    Hi,
    I am getting crazy on how to solve this error. :(
    I still have 4Gb space in my TBSP1, what does "13" in the keyword "beyond" stands for? is it in bytes or blocks? which parameter can I see this number 13? Is it in tablespace/datafiles storage params or is it in create table parameter?
    Thanks

    Possible solutions:
    **On the command prompt**
    1.Make sure data file is not filled up and auto extend is on.
    2.Try to add a data file or alter existing data file with auto extend capability and max extents unlimited.
    alter database datafile '/..../fiilename.dbf' autoextend on maxsize unlimited;
    3.Try de-fragmentation of tablespace that caused the problem.
    alter tablespace TBSP1 coalesce;
    **If you have TOAD, here is the best possible solution**
    1. Go to database icon, click schema browser, set your schema as SYSTEM or SYS, then look for tablespaces tab below.
    2. Click on the tablespaces tab, look for the tablespace that caused the problem,click the tablespace.
    3. Click Basic Info tab, beneath that find extent management.
    4. Click on auto allocate extent sizes.
    5. Click OK button.
    That`s it Problem is resolved.
    -Regards
    Rah

  • How do you fix imac disk defragmentation? I used Drive Genius 3 and the same things keep coming back as fragmented.

    How do you repair disk defragmentation on an imac? I tried with Drive Genius 3 and after completion the same defrag keeps showing up.

    Disk fragmentation and particularly whether it can be fixed, is very controversial.  The following thread is worth reading:
    https://discussions.apple.com/thread/3327627?start=0&tstart=0
    I think it's true that disks can become fragmented, and this can affect performance. However it is also said that the OS X file system attempts to address this issue in the background all the time, apparently for certain sizes of files in particular.
    In my experience the biggest problem is actually lack of disk space.  If you don't have a fair amount of free space on your drive, tinkering with the fragments won't help much if your system needs to create a swap file or do some other maintenance.  So my recommendation is that you follow the advice to clone and re-create your drive, but if you have limited free space, consider upgrading the disk or the entire computer in the longer term.
    Hope that's helpful.
    Ivan

Maybe you are looking for