<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Database Fragmentation in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329825#M873876</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Tablespaces:&lt;BR /&gt;&lt;BR /&gt;Don't use autoextend because you'll lose the control of extents.  &lt;BR /&gt;&lt;BR /&gt;Coalesce the tablespaces:&lt;BR /&gt;&lt;BR /&gt;select 'alter tablespace '||tablespace_name||' coalesce;'&lt;BR /&gt;from dba_free_space_coalesced&lt;BR /&gt;where percent_extents_coalesced &amp;lt; 50 and&lt;BR /&gt;tablespace_name not in ('SYSTEM','SYS')&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Segments (tables and indexes):&lt;BR /&gt;&lt;BR /&gt;First you may want to see the major problematic segments:&lt;BR /&gt;&lt;BR /&gt;SELECT COUNT(*), segment_name&lt;BR /&gt;FROM DBA_EXTENTS&lt;BR /&gt;GROUP BY segment_name&lt;BR /&gt;ORDER BY 1 DESC&lt;BR /&gt;&lt;BR /&gt;For the problematic extents you must redefine (increase) the storage values...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tables:&lt;BR /&gt;&lt;BR /&gt;ALTER TABLE &lt;OWNER&gt;.&lt;TABLE&gt; STORAGE ( NEXT &lt;SIZE_NEXT_EXTENT&gt;K);&lt;BR /&gt;&lt;BR /&gt;But the above step will just prevent future fragments, not correct the existents. To correct the existent non-sense of extents you must export and import each table that have those problems: you must do the export with the COMPRESS=Y parameter so the import will put the data in only one extent: the first one!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indexes:&lt;BR /&gt;&lt;BR /&gt;Here you can rebuild.&lt;BR /&gt;&lt;BR /&gt;alter index &lt;OWNER&gt;.&lt;INDEX_NAME&gt; rebuild&lt;BR /&gt;storage (initial &lt;INITIAL_SIZE&gt;K next &lt;NEXT_SIZE&gt;K); -- A good rule is to use NEXT_SIZE = INITIAL_SIZE / 2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this and the other answers will help you!&lt;BR /&gt;&lt;BR /&gt;&lt;/NEXT_SIZE&gt;&lt;/INITIAL_SIZE&gt;&lt;/INDEX_NAME&gt;&lt;/OWNER&gt;&lt;/SIZE_NEXT_EXTENT&gt;&lt;/TABLE&gt;&lt;/OWNER&gt;</description>
    <pubDate>Tue, 13 Jul 2004 08:48:48 GMT</pubDate>
    <dc:creator>Eric Antunes</dc:creator>
    <dc:date>2004-07-13T08:48:48Z</dc:date>
    <item>
      <title>Database Fragmentation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329822#M873873</link>
      <description>We are planning to rebuild a 8.0.4 Oracle database avoiding possible fragmentation problems.&lt;BR /&gt;&lt;BR /&gt;Before proceeding, we want first to clarify if fragmentation issues are happening or not.&lt;BR /&gt;&lt;BR /&gt;So what we need is any sript that helps on discovering tables and tablespaces fragmentation and then how to recreate objects with the corect clauses to avoid it.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.</description>
      <pubDate>Tue, 13 Jul 2004 06:23:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329822#M873873</guid>
      <dc:creator>Manuel Gómez González</dc:creator>
      <dc:date>2004-07-13T06:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Database Fragmentation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329823#M873874</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.think-forward.com/sql_scripts.htm" target="_blank"&gt;http://www.think-forward.com/sql_scripts.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.think-forward.com/sql/ts_free_frag.htm" target="_blank"&gt;http://www.think-forward.com/sql/ts_free_frag.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.orsweb.com/master-list/p-master-list.html" target="_blank"&gt;http://www.orsweb.com/master-list/p-master-list.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for scripts&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For how to avoid&lt;BR /&gt;&lt;A href="http://www.orsweb.com/downloads/sql/space_management/" target="_blank"&gt;http://www.orsweb.com/downloads/sql/space_management/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Admin processes&lt;BR /&gt;&lt;BR /&gt;      Steve Steel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jul 2004 06:42:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329823#M873874</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2004-07-13T06:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Database Fragmentation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329824#M873875</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;two important things you may wish to consider for the operation you are trying to do:&lt;BR /&gt;&lt;BR /&gt;1. Upgrade to 8.1.7.4.&lt;BR /&gt;2. Start using or convert all your Dictionary managed tablespaces (DMT) to Locally managed tablespaces (LMT) (which will allow you to NEVER do such a thing again in the future!!)&lt;BR /&gt;&lt;BR /&gt;if you need any further assistance, please let us know.&lt;BR /&gt;&lt;BR /&gt;best regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Tue, 13 Jul 2004 07:56:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329824#M873875</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2004-07-13T07:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Database Fragmentation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329825#M873876</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Tablespaces:&lt;BR /&gt;&lt;BR /&gt;Don't use autoextend because you'll lose the control of extents.  &lt;BR /&gt;&lt;BR /&gt;Coalesce the tablespaces:&lt;BR /&gt;&lt;BR /&gt;select 'alter tablespace '||tablespace_name||' coalesce;'&lt;BR /&gt;from dba_free_space_coalesced&lt;BR /&gt;where percent_extents_coalesced &amp;lt; 50 and&lt;BR /&gt;tablespace_name not in ('SYSTEM','SYS')&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Segments (tables and indexes):&lt;BR /&gt;&lt;BR /&gt;First you may want to see the major problematic segments:&lt;BR /&gt;&lt;BR /&gt;SELECT COUNT(*), segment_name&lt;BR /&gt;FROM DBA_EXTENTS&lt;BR /&gt;GROUP BY segment_name&lt;BR /&gt;ORDER BY 1 DESC&lt;BR /&gt;&lt;BR /&gt;For the problematic extents you must redefine (increase) the storage values...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tables:&lt;BR /&gt;&lt;BR /&gt;ALTER TABLE &lt;OWNER&gt;.&lt;TABLE&gt; STORAGE ( NEXT &lt;SIZE_NEXT_EXTENT&gt;K);&lt;BR /&gt;&lt;BR /&gt;But the above step will just prevent future fragments, not correct the existents. To correct the existent non-sense of extents you must export and import each table that have those problems: you must do the export with the COMPRESS=Y parameter so the import will put the data in only one extent: the first one!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indexes:&lt;BR /&gt;&lt;BR /&gt;Here you can rebuild.&lt;BR /&gt;&lt;BR /&gt;alter index &lt;OWNER&gt;.&lt;INDEX_NAME&gt; rebuild&lt;BR /&gt;storage (initial &lt;INITIAL_SIZE&gt;K next &lt;NEXT_SIZE&gt;K); -- A good rule is to use NEXT_SIZE = INITIAL_SIZE / 2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this and the other answers will help you!&lt;BR /&gt;&lt;BR /&gt;&lt;/NEXT_SIZE&gt;&lt;/INITIAL_SIZE&gt;&lt;/INDEX_NAME&gt;&lt;/OWNER&gt;&lt;/SIZE_NEXT_EXTENT&gt;&lt;/TABLE&gt;&lt;/OWNER&gt;</description>
      <pubDate>Tue, 13 Jul 2004 08:48:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329825#M873876</guid>
      <dc:creator>Eric Antunes</dc:creator>
      <dc:date>2004-07-13T08:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Database Fragmentation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329826#M873877</link>
      <description>One more thing I've forgotted:&lt;BR /&gt;&lt;BR /&gt;Don't change anything on the SYS ans SYSTEM users:&lt;BR /&gt;&lt;BR /&gt;SELECT COUNT(*), segment_name&lt;BR /&gt;FROM DBA_EXTENTS&lt;BR /&gt;where owner not in ('SYS','SYSTEM')&lt;BR /&gt;GROUP BY segment_name&lt;BR /&gt;ORDER BY 1 DESC&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jul 2004 08:53:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/database-fragmentation/m-p/3329826#M873877</guid>
      <dc:creator>Eric Antunes</dc:creator>
      <dc:date>2004-07-13T08:53:59Z</dc:date>
    </item>
  </channel>
</rss>

