Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL Script for eliminating table extents.
Hi, David,
Your question.
>First, I am assuming that the export/import will create tables with a >default size and extent size regardless of how much data will go into >that table. YES / NO???
>Second,
>Does anybody have an SQL script that will:
>1) look at all the tables/indexes in a tablespace
>2) formulate a drop table and create table/index script
>3) look at current space used by the table/index
>4) include in the create table/index command initial sizes in order to
> minimize the number of extents a table/index uses
>
>Thanks,
>David Priebe
>alphora7_at_renfrew.edu.on.ca
Maybe this will help.
I have been through an experience where the tables where over allocated and can share what I did to resize the database extents.In this situation the Oracle database was created by another DBA and the initial extents were set to 5M as the default. The result of this LARGE initial size was that most tables were way over allocated. So my task was to resize all 600+ tables and 800+ indexes. Here is quick overview of what I did:
This saved almost 1 gig on our database system. If you would like more information on scripts or question, feel free to email me.
Sylvan Creach, Oracle DBA sc00802_at_po1.cobe.com Cobe Laboratories, Inc. (303)239-2206 1185 Oak St Platforms: HP-UX 9.04 (UNIX) Lakewood, CO 80215-4407 USA OSF1 3.2(UNIX) Windows NT