Resizing initial extent

HI Guys
Is there a way to resize the initial extent of a table without dropping and recreating by changing the INITIAL parameter? Is there a kind of package or something available?
We have lot of tables with initial size is quite big as they were defined in production. Unable to change the initial parameter when the tables are imported from prod. The dump is exported with COMPRESS=N and ROWS=N.
Appreciate your help.
Regards
Bhaskara

There is no way to redefine the initial extent but by dropping/recreating it. But you can try to deallocate the unused space beyond the High Water Mark (alter table table_name deallocate unused keep 0;), as shown on the next demo:
SQL> edit
Wrote file afiedt.buf
  1  create table emp1
  2  storage( initial 8m next 8m )
  3* as select * from employees
SQL> /
Table created.
SQL> analyze table emp1 compute statistics;
Table analyzed.
SQL>  select blocks, table_name from user_tables;
    BLOCKS TABLE_NAME
         6 EMP1
SQL> r
  1  select blocks, segment_name from user_segments
  2* where segment_name ='EMP1'
    BLOCKS SEGMENT_NAME
      1024 EMP1
SQL> alter table emp1 deallocate unused keep 0;
Table altered.
SQL> select blocks, segment_name from user_segments
  2  where segment_name ='EMP1';
    BLOCKS SEGMENT_NAME
         8 EMP1
SQL> select table_name, initial_extent from user_tables;
TABLE_NAME                     INITIAL_EXTENT
EMP1                                    65536
EMPLOYEES                               65536~ Madrid

Similar Messages

  • How to fix tables created with wrong initial extents

    1.We have many tables which are created with very large intial extents. Is there a way to reduce or resize initial extent?
    2.When I export the *.dmp is about 200MG, but the tablespace is more than a gig full. Why is that?
    3.I have a table with about 300,000 rows and calculated the table size to be around 86M. Should I create the initial extent here to be around 100M?
    4.I tried to do alter table ExampleTable deallocate unused, but did not help why is that?
    OBJECT_NAME = EMP
    TOTAL_BLOCKS = 16296
    TOTAL_BYTES = 133496832
    UNUSED_BLOCKS = 4915
    UNUSED BYTES = 40263680
    LAST_USED_EXTENT_FILE_ID = 9
    LAST_USED_EXTENT_BLOCK_ID = 23250
    LAST_USED_BLOCK = 11381
    PL/SQL procedure successfully completed.
    SQL> analyze table ibs_spec_value compute statistics;
    Table analyzed.
    SQL> select empty_blocks, empty_blocks*8192 unused_bytes
    2 from dba_tables
    3 where table_name='IBS_SPEC_VALUE' and owner='SPEC';
    EMPTY_BLOCKS UNUSED_BYTES
    4915 40263680
    SQL> ALTER TABLE SPEC.IBS_SPEC_VALUE DEALLOCATE UNUSED;
    Table altered.
    SQL> select empty_blocks, empty_blocks*8192 unused_bytes
    2 from dba_tables
    3 where table_name='IBS_SPEC_VALUE' and owner='SPEC';
    EMPTY_BLOCKS UNUSED_BYTES
    4915 40263680
    Thank you,
    Avanti.

    1.We have many tables which are created with very large intial extents. Is there a way to reduce or resize initial extent?
    export/import and CTAS.
    2.When I export the *.dmp is about 200MG, but the tablespace is more than a gig full. Why is that?
    Probably it is due of inefficient on managing the objects, which are heavily taken by tables/indexes. Tables/indexes were created oversize than estimation of data size.
    3.I have a table with about 300,000 rows and calculated the table size to be around 86M. Should I create the initial extent here to be around 100M?
    Yes, it is possible. Usually split into 2-5 extents is better.
    4.I tried to do alter table ExampleTable deallocate unused, but did not help why is that?
    OBJECT_NAME = EMP
    TOTAL_BLOCKS = 16296
    TOTAL_BYTES = 133496832
    UNUSED_BLOCKS = 4915
    UNUSED BYTES = 40263680
    LAST_USED_EXTENT_FILE_ID = 9
    LAST_USED_EXTENT_BLOCK_ID = 23250
    LAST_USED_BLOCK = 11381
    PL/SQL procedure successfully completed.
    SQL> analyze table ibs_spec_value compute statistics;
    Table analyzed.
    SQL> select empty_blocks, empty_blocks*8192 unused_bytes
    2 from dba_tables
    3 where table_name='IBS_SPEC_VALUE' and owner='SPEC';
    EMPTY_BLOCKS UNUSED_BYTES
    4915 40263680
    SQL> ALTER TABLE SPEC.IBS_SPEC_VALUE DEALLOCATE UNUSED;
    Table altered.
    SQL> select empty_blocks, empty_blocks*8192 unused_bytes
    2 from dba_tables
    3 where table_name='IBS_SPEC_VALUE' and owner='SPEC';
    EMPTY_BLOCKS UNUSED_BYTES
    4915 40263680
    The next paragraph is guoted from Oracle documentation :
    "Use the deallocate_unused_clause to explicitly deallocate unused space at the end of the table, partition or subpartition, overflow data segment, LOB data segment, or LOB index and makes the space available for other segments in the tablespace. You can free only unused space above the high water mark (that is, the point beyond which database blocks have not yet been formatted to receive data)".
    Most probably on your case there is no unused block over the last used block on this table. So the deallocate function doesn't give any effect. As you described, the last used block is 11381 which is get from TOTAL_BLOCKS minus UNUSED_BLOCKS.

  • Can we change the initial extent size of tablespaces

    Hi All,
    Can we change the initial extent size of tablespaces.
    Oracle version-11.2.0.1
    OS - IBM AIX
    Please suggest.
    Thanks and Regards,

    There is no way to redefine the initial extent but by dropping/recreating it. But you can try to deallocate the unused space beyond the High Water Mark (alter table table_name deallocate unused keep 0;), as shown on the next demo:
    Madrid @ Re: Resizing initial extent
    Regards
    Girish Sharma

  • ORA-01658: unable to create INITIAL extent for segment in tablespace

    NEW REPOSITORY INSTALLATION ERROR!!
    I want to install a new Repository using Oracle9iR9.2.0.1 and iDS10g on windowsXP Professional the same machine.
    After running all the SQL scripts ( ckqa,ckvalqa,ckcreate,ckreport) with success to installing a new Repository on my Database using "the Scripts Method",I start the Repository Administration Utility( RAU) to scheck the priveleges and so on.
    After pressing the Install button in the RAU:
    -I take public synonyms
    -I scheck the box for "Support Designer Objects", then
    -The Repository size is Medium
    -I have not change the defauft Tablespace of the Repository_Manager names TEMPORARY_TABLES to store the index and table of System Data....Diagram Data.
    After Starting, the Installation began an stop by installing some Tables like schown :
    Operation: Started : 07/03/04 20:26:32
    Reading File: cktabs.sql
    Object : TABLE CDDL_TMP_TBL
    Executing statement(s)...
    Verifying...
    .and so on till....uns so weiter bis
    Reading File: cktabs.sql
    Object : TABLE RM$INFO
    Executing statement(s)...
    Error Submitting Definition: User intervention required...
    RME-02124: Failed to execute SQL statement: CREATE TABLE RM$INFO
    (NAME VARCHAR2(128) NOT NULL
    ,VALUE VARCHAR2(128)
    Storage (initial 4K next 4K pctincrease 0) Tablespace TEMPORARY_TABLES
    ORA-01658: unable to create INITIAL extent for segment in tablespace TEMPORARY_TABLES
    Dumping Buffer...
    CREATE TABLE RM$INFO
    (NAME VARCHAR2(128) NOT NULL
    ,VALUE VARCHAR2(128)
    ...End of Buffer
    User Requested: Stop Process
    When I read the Help of the Error the
    CAUSE was: Failed to find sufficient contiguous Space to allocate INITIAL extend for Segment being created.
    ACTION: Use ALTER TABLESPACE ADD DATAFILE to add additional space to the tablespace or retry with a smaller Value for initial.
    I then try to resolve it by schecking and changing the Values of INITIAL_VALUE and NEXT_VALUE in the ckparams.txt to 500k.I change the Values of TEMPORARY_TABLES(10214 to 51200k) and TEMPORARY_INDEXES from (20000 to 100000k).Then I run the scripts @ckparams.txt, @ckvalqa, @ckcreate but
    -pressing the Scheck Privileges Button on the RAU still give me 106k for the INITIAL_ and NEXT_VALUE.
    -And the installato still stop with the same Error.
    Question: How schould I resolve this Configuration?
    You could respond in ENGLICH, GERMAN or FRENCH
    Thank you for your Help!

    You are running into database errors. You should refer to the database documentation on how to adjust the size your tablespaces. The online Designer installation guide will advise you as to the sizes of tablespaces you require. (http://otn.oracle.com/pls/wocprod/docs/page/ocom/technology/products/designer/supporting_doc/Des10g_9044/cmnhlp72/rep_insgde/igttl_9i.htm)
    Regards
    Sue

  • Unable to create INITIAL extent

    Hi,
    While creating a table i am getting the following error
    "unable to create INITIAL extent for segment in tablespace SYSTEM"
    So kindly advice how to fix this.
    Thanks,
    Vineet

    If you have a DBA there, ask them what the name of the tablespace is for tables and modify your table create statement to something like
    CREATE TABLE mytable (column1 NUMBER) TABLESPACE tables_tablespace;
    and chance the tables_tablespace bit to whatever your dba says is the tablespace for tables.
    It's probably a good idea to change the default tablespace for the user you are logged into the database with, unless you are logged in as sys, to something other than SYSTEM.
    THT

  • Query to find tables with excessive initial extent settings

    After loading a database dump we found many tables occupying large space due to large initial extents storage parameter but with very few rows and am trying to determine if it would be worth the effort to reorganize the entire schema. In other words, we are looking for a query to compare the estimated actual space that would be occupied by the table rows vs. the current size to see the space savings if we were to reorganize.
    I hacked out a script to calculate the estimated size using the table stats (or 64K if estimate is lower) and compared that vs. the extents allocated to each table but this seems a rather inexact way of doing it. Is there a more accurate approach?
    Doing this on Oracle database 10.2.0.4 on Windows Server 2003 SE
    SELECT a.table_name,
               b.table_size_MB,
               ROUND((a.num_rows * a.avg_row_len) / (1024 * 1024),2) calc_size_MB, 
               b.table_size_MB - GREATEST(ROUND((a.num_rows * a.avg_row_len) / (1024 * 1024),2), 0.0625) savings_MB
      FROM dba_tables a,
          (SELECT segment_name, sum(bytes)/(1024*1024) table_size_MB
             FROM dba_extents
            WHERE tablespace_name like 'PMDX' and segment_type = 'TABLE'
            GROUP BY segment_name) b
    WHERE a.owner = 'CAS' and a.table_name = b.segment_name
    ORDER BY b.table_size_MB desc
    TABLE_NAME                     TABLE_SIZE_MB CALC_SIZE_MB SAVINGS_MB
    TPM06_POL_DATA_WRK_PREV                  640       493.46     146.54
    TPM06_POL_DATA_WRK_CURR                  640       496.57     143.43
    TPM06_POL_DATA_201006                    640        496.8      143.2
    TPM06_POL_DATA_201005                    640       494.87     145.13
    TPM06_POL_DATA_201004                    640       490.45     149.55
    TPM07_MOV_DTLS_WRK                       256       198.66      57.34
    ...

    Hi,
    Didn't you check the dba_extents view with respect to the tables which you estimated.
    After loading a database dump we found many tables occupying large space due to large initial extents storage parameterYou might have modified the initial extent size before to your load by pre-created tables ,which might helped out with current situation prior to this as you might be well known with your current database. Does the segement using Autoallocate or Uniform. What is the block size of DB.
    - Pavan Kumar N

  • Problem with table size (initial extent)

    Hi,
    I have imported a table from my client's database, which shows the following size parameters as displayed from the user_segments table :-
    bytes : 33628160
    blocks : 4105
    extents : 1
    initial_extent : 33611776
    next_extent : 65536
    The number of rows in the table is 0 (zero). I am wondering how the table size could become so large, while other tables in the schema in the same tablespace have normal initial extent size.
    I then created a tablespace with an initial and next extent of 64k each, and imported the data into the tablespace, after which the table size and the initial extent for the table remained to be 33611776. This is the problem with 4-5 other tables out of a total of 500 tables.
    Of course if i drop and recreate the table, there is no problem, and the initial extent size and the table size becomes 64k, same as per the tablespace.
    Any suggestions? I do not want to drop the tables and recreate them.
    Because of this problem, even an attempt to import a blank database is consuming 2 GB of hard disk space.
    Thanks in advance
    DSG

    I don't think you can stop the extent from being allocated when you import the table.
    Even if you try to let the table inherit storage parameters from the tablespace, it will still allocate as many 64K extents as it needs to get to the 33M size in the table's (imported) storage parameter. I have also seen that when trying to change storage during an import like that, you can look in dba_tables and see the table has an ititial setting of 33M even though when you look in dba_segments you'll see that every extent allocated was in fact 64K. The dba_tables table is getting populated directly from the import and will therefore report the wrong number.
    Perhaps you can import then create table as... to put the tables in a better storage set up. (Letting tables inherit from the tablespace is the best way to go...no fragmentation that way). You might want to get the client to let you revamp the storage since theres no good reason to have one huge extent like that.

  • Import fails (cannot create initial extent)

    I am running an import (using the interactive screen, and importing 1 user only)
    After creating a couple of tables, the import starts failing with "cannot create initial extent" errors.
    When I look at the free space, the tablespace I am importing into, has no free space left.
    What I don't understand, is that - I created this tablespace exactly the same size, as the tablespace I exported from (on a remote system). Source=4Gb, Target=4Gb
    Why is this happening ?

    I was never faced with that issue before so I am just guessing...
    Did you create the tablespace with the same initial/next extent values?
    Also, have you tried setting the tablespace to autoextend? It will not answer the "why", but it will at least allow you to see how much larger that tablespace needs to be and let the import finish.

  • Unable to open file "NULL\.EXT" - default sizes assumed for initial extents

    Dear Friends i am trying to install IDES 4.6C on Windows 2000 Advance server + MSSQL2000 this error i am facing during installation all of the installation files are on my D:\ drive following is the structure.
    D:\DBExport\DB
    D:\DBExport\Data
    D:\DBExport\LABEL.ASC
    and kernal also on D:\ drive.
    this is the error number one which i got
    Error: DBR3LOADEXEC_NT_MSS R3loadPrepare 2 722
    Child exited with error: rc = 2
    child_pid = 1
    See logfile SAPAPPL2.log for further information
    and here is the associated log file.
    #START OF LOG: 20060123112519
    R3load version @(#) $Id: //bas/46D/src/ins/R3load/R3load.c#12 $ SAP
    R3load -fast -i SAP0000.cmd -p SAP0000.log
    start of syntax check ###
    end of syntax check ###
    #START: 20060123112520
    error message: No such file or directory
    (GOS) WARNING: Unable to open file "NULL\.EXT" - default sizes assumed for initial extents
    (OLD) ERROR: CREATE statement failed for object "D010L"
         (CREATE TABLE "D010L" ( "PROG" VARCHAR(40) NOT NULL ,
    "R3STATE" VARCHAR(1) NOT NULL , "R3MODE" VARCHAR(1) NOT NULL ,
    "R3VERSION" VARCHAR(4) NOT NULL , "MACH" SMALLINT NOT NULL ,
    "BLOCKNR" TINYINT NOT NULL , "BLOCKLG" DECIMAL(5,0) NOT NULL ,
    "BLOCK" IMAGE NULL  )
    exec sp_bindefault 'str_default','D010L.PROG'
    exec sp_bindefault 'str_default','D010L.R3STATE'
    exec sp_bindefault 'str_default','D010L.R3MODE'
    exec sp_bindefault 'str_default','D010L.R3VERSION'
    exec sp_bindefault 'num_default','D010L.MACH'
    exec sp_bindefault 'num_default','D010L.BLOCKNR'
    exec sp_bindefault 'num_default','D010L.BLOCKLG'
    DbSlExecute: rc = 106
    (SQL error 2714)
    error message returned by DbSl:
    There is already an object named 'D010L' in the database.
    #STOP: 20060123112520
    #START OF LOG: 20060123152536
    R3load version @(#) $Id: //bas/46D/src/ins/R3load/R3load.c#12 $ SAP
    R3load -fast -i SAP0000.cmd -p SAP0000.log -r
    start of syntax check ###
    end of syntax check ###
    trying to restart import ###
    (RIM) INFO: table "D010L" dropped
    restart finished ###
    #START: 20060123152552
    error message: No such file or directory
    (GOS) WARNING: Unable to open file "NULL\.EXT" - default sizes assumed for initial extents
    (IMP) TABLE: "D010L"
    #Trying to create primary key "D010L~0"
    (IMP) PRKEY: "D010L~0"
    (OLD) ERROR: CREATE statement failed for object "D010LINF"
         (CREATE TABLE "D010LINF" ( "PROG" VARCHAR(40) NOT NULL ,
    "R3STATE" VARCHAR(1) NOT NULL , "R3MODE" VARCHAR(1) NOT NULL ,
    "R3VERSION" VARCHAR(4) NOT NULL , "MACH" SMALLINT NOT NULL ,
    "R3RELEASE" VARCHAR(4) NOT NULL , "R3MODIFY" INT NOT NULL ,
    "UNAM" VARCHAR(12) NOT NULL , "UDAT" VARCHAR(8) NOT NULL ,
    "UTIME" VARCHAR(6) NOT NULL , "L_DATALG" INT NOT NULL ,
    "Q_DATALG" INT NOT NULL , "Y_DATALG" INT NOT NULL , "SDAT" VARCHAR(8) NOT NULL ,
    "STIME" VARCHAR(6) NOT NULL  )
    exec sp_bindefault 'str_default','D010LINF.PROG'
    exec sp_bindefault 'str_default','D010LINF.R3STATE'
    exec sp_bindefault 'str_default','D010LINF.R3MODE'
    exec sp_bindefault 'str_default','D010LINF.R3VERSION'
    exec sp_bindefault 'num_default','D010LINF.MACH'
    exec sp_bindefault 'str_default','D010LINF.R3RELEASE'
    exec sp_bindefault 'num_default','D010LINF.R3MODIFY'
    exec sp_bindefault 'str_default','D010LINF.UNAM'
    exec sp_bindefault 'str_default','D010LINF.UDAT'
    exec sp_bindefault 'str_default','D010LINF.UTIME'
    exec sp_bindefault 'num_default','D010LINF.L_DATALG'
    exec sp_bindefault 'num_default','D010LINF.Q_DATALG'
    exec sp_bindefault 'num_default','D010LINF.Y_DATALG'
    exec sp_bindefault 'str_default','D010LINF.SDAT'
    exec sp_bindefault 'str_default','D010LINF.STIME'
    DbSlExecute: rc = 106
    (SQL error 2714)
    error message returned by DbSl:
    There is already an object named 'D010LINF' in the database.
    #STOP: 20060123152556
    #START OF LOG: 20060123154952
    R3load version @(#) $Id: //bas/46D/src/ins/R3load/R3load.c#12 $ SAP
    R3load -fast -i SAP0000.cmd -p SAP0000.log -r
    start of syntax check ###
    end of syntax check ###
    trying to restart import ###
    (RIM) INFO: table "D010LINF" dropped
    restart finished ###
    #START: 20060123154955
    (IMP) TABLE: "D010LINF"
    #Trying to create primary key "D010LINF~0"
    (IMP) PRKEY: "D010LINF~0"
    (OLD) ERROR: CREATE statement failed for object "D010Q"
         (CREATE TABLE "D010Q" ( "PROG" VARCHAR(40) NOT NULL ,
    "R3STATE" VARCHAR(1) NOT NULL , "R3MODE" VARCHAR(1) NOT NULL ,
    "R3VERSION" VARCHAR(4) NOT NULL , "MACH" SMALLINT NOT NULL ,
    "BLOCKNR" TINYINT NOT NULL , "BLOCKLG" DECIMAL(5,0) NOT NULL ,
    "BLOCK" IMAGE NULL  )
    exec sp_bindefault 'str_default','D010Q.PROG'
    exec sp_bindefault 'str_default','D010Q.R3STATE'
    exec sp_bindefault 'str_default','D010Q.R3MODE'
    exec sp_bindefault 'str_default','D010Q.R3VERSION'
    exec sp_bindefault 'num_default','D010Q.MACH'
    exec sp_bindefault 'num_default','D010Q.BLOCKNR'
    exec sp_bindefault 'num_default','D010Q.BLOCKLG'
    DbSlExecute: rc = 106
    (SQL error 2714)
    error message returned by DbSl:
    There is already an object named 'D010Q' in the database.
    #STOP: 20060123154956
    #START OF LOG: 20060123162918
    R3load version @(#) $Id: //bas/46D/src/ins/R3load/R3load.c#12 $ SAP
    R3load -fast -i SAP0000.cmd -p SAP0000.log -r
    start of syntax check ###
    end of syntax check ###
    trying to restart import ###
    (RIM) INFO: table "D010Q" dropped
    restart finished ###
    #START: 20060123162920
    (IMP) TABLE: "D010Q"
    #Trying to create primary key "D010Q~0"
    (IMP) PRKEY: "D010Q~0"
    (IMP) ERROR: CREATE statement failed for object "D010Y"
         (CREATE TABLE "D010Y" ( "PROG" VARCHAR(40) NOT NULL ,
    "R3STATE" VARCHAR(1) NOT NULL , "R3MODE" VARCHAR(1) NOT NULL ,
    "R3VERSION" VARCHAR(4) NOT NULL , "MACH" SMALLINT NOT NULL ,
    "BLOCKNR" TINYINT NOT NULL , "BLOCKLG" DECIMAL(5,0) NOT NULL ,
    "BLOCK" IMAGE NULL  )
    exec sp_bindefault 'str_default','D010Y.PROG'
    exec sp_bindefault 'str_default','D010Y.R3STATE'
    exec sp_bindefault 'str_default','D010Y.R3MODE'
    exec sp_bindefault 'str_default','D010Y.R3VERSION'
    exec sp_bindefault 'num_default','D010Y.MACH'
    exec sp_bindefault 'num_default','D010Y.BLOCKNR'
    exec sp_bindefault 'num_default','D010Y.BLOCKLG'
    DbSlExecute: rc = 106
    (SQL error 2714)
    error message returned by DbSl:
    There is already an object named 'D010Y' in the database.
    #STOP: 20060123162921
    I am really struck with the installation any help will be highly appreciated.
    best regards,
    Zeeshan

    Hi:
    It seemed to me that you put the wrong directory or drive when started the installation. It shows "error message: No such file or directory" when trying to locate the files.
    You can try to verify your inputs during first phase of the installation.
    Hope this helps!
    Best Regards,
    Federico G. Babelis
    NetWeaver Certified Consultant
    http://www.gazum.com

  • Unable to create INITIAL extent for segment in tablespace FLOW_4686

    I'm trying to create a new table on here (only 4 rows) from a spreadsheet, and I keep getting the following:
    ORA-20001: Excel load run ddl error: drop table "COMMODITIES" ORA-00942: table or view does not exist ORA-20001: Excel load run ddl error: create table "COMMODITIES" ( "ID" NUMBER, "DEP_ID" NUMBER, "LINE" NUMBER, "CODE" VARCHAR2(6), "COMMOD" VARCHAR2(30), "QUAL" VARCHAR2(30), "COMMOD_TP" VARCHAR2(1), "IMPORT" VARCHAR2(5), constraint "COMMODITIES_PK" primary key("ID") ) ORA-01658: unable to create INITIAL extent for segment in tablespace FLOW_4686
    I'm trying to upload/create this to see if I get the same error messages on here as I do on my local installation for another problem I'm having.
    Thanks

    Thanks Sergio, to you and the rest of the HTMLDB team. I remember reading somewhere that there's only 13 of you guys working on this product, and with development work and answering all of our questions on here, you guys are really doing a great job and deserve every penny you guys make (and more!)
    Thanks again!

  • ORA:01658 Unable to create initial extent error

    Gurus,
    While importing a .dmp file I am getting following error
    IMP-00003 : Oracle error 1658 encountered
    ORA-01658: Unable to create INTIAL EXTENT for segment in tablespace INDX
    IMP-000017: following statement failed with ORacle error 1658:
    " CREATE INDEX "CSDT_RQS_INDEX" ON CSDT" ( "BASE_MASTER_KEY")PCTFREE 10 INTRANS 2 MAXTRANS 255 STORAGE(INTIAL 7864320 NEXT 131072 MINEXTENTS 1 MAEXTENTS 4096 PCTINCREASE 0 FREELISTS GROUPS1 BUFFER_POOL DEFAULT
    TABLSPACE "INDX" lOGGING.
    Please help to figure out what's wrong?
    Thanks in advance.

    With this SQL Statement you can find out the spaces in tablespaces.
    SQL> select u.tblspc "TBLSPC", a.fbytes "ALLOC", u.ebytes USED, a.fbytes-u.ebytes UNUSED,
    2 (u.ebytes/a.fbytes)*100 USEDPCT
    3 from (select tablespace_name tblspc, sum(bytes) ebytes
    4 from sys.dba_extents
    5 group by tablespace_name) u,
    6 (select tablespace_name tblspc, sum(bytes) fbytes
    7 from sys.dba_data_files
    8 group by tablespace_name) a
    9 where u.tblspc = a.tblspc
    10 ;
    TBLSPC ALLOC USED UNUSED USEDPCT
    CARTEST_DATA 891289600 488701952 402587648 54,8308824
    CARTEST_IDX 83886080 46465024 37421056 55,390625
    CARTMPTEST_DATA 41943040 26935296 15007744 64,21875
    RBS 541065216 104857600 436207616 19,379845
    SYSTEM 471859200 373547008 98312192 79,1649306
    TEMP 209715200 58654720 151060480 27,96875
    6 rows selected.
    SQL>
    Joel Pérez
    http://otn.oracle.com/experts

  • Is it possible to change the INITIAL_EXTENT of a tablespace after creation

    Hi,
    Few days ago i have created the database (size nearly 13 TB). But now i need to change the INITIAL_EXTENT of most of the tablespaces i created.
    Is it possible?
    If yes ,what r the steps?
    If no, what can be the work around?
    Oracle version:11gR1
    OS:Sun OS
    Cheers,
    Kunwar

    user9131570 wrote:
    Hi,
    Few days ago i have created the database (size nearly 13 TB). But now i need to change the INITIAL_EXTENT of most of the tablespaces i created.
    Is it possible?
    If yes ,what r the steps?
    If no, what can be the work around?
    Oracle version:11gR1
    OS:Sun OS
    Cheers,
    Kunwarrefer thread: Thread: Resizing initial extent , you will get answer for your questions.
    Re: Resizing initial extent

  • Minimum extent 값 수정하는 방법

    DB Ver. 8.1.6.3
    tablespace 생성시, minimum extent 옵션을 선택하여 만들었습니다. 이값이 너무 커서 resizing 하려고
    alter tablespace CBOHR minimum extent 0k; 했더니
    ora-25143 에러가 납니다. alter 명령어가 틀린건지, 아니면
    다른 이유가 있는건지 잘 모르겠습니다.
    현재 CBOHR은 extent management local로 지정되어 있습니다.
    글 수정:
    sglim79

    locally managed tablespace에서는 minimum extent값의 수정이 불가능합니다.
    initial 값도 dmt를 하던지 lmt를 사용하던지 수정이 불가능합니다.
    수정하는 방법은 테이블스페이스를 새로 만들고 move tablespace 시키거나,
    export/import하는 방법을 통해서 reorg하는 방법밖에는 없습니다.
    9i document에서..
    INITIAL
    Specify in bytes the size of the object's first extent. Oracle allocates space for this extent when you create the schema object. Use K or M to specify this size in kilobytes or megabytes.
    The default value is the size of 5 data blocks. In tablespaces with manual segment-space management, the minimum value is the size of 2 data blocks plus one data block for each free list group you specify. In tablespaces with automatic segment-space management, the minimum value is 5 data blocks. The maximum value depends on your operating system.
    In dictionary-managed tablespaces, if MINIMUM EXTENT was specified for the tablespace when it was created, then Oracle rounds the value of INITIAL up to the specified MINIMUM EXTENT size if necessary. If MINIMUM EXTENT was not specified, then Oracle rounds the INITIAL extent size for segments created in that tablespace up to the minimum value (see preceding paragraph), or to multiples of 5 blocks if the requested size is greater than 5 blocks.
    In locally managed tablespaces, Oracle uses the value of INITIAL in conjunction with the size of extents specified for the tablespace to determine the object's first extent. For example, in a uniform locally managed tablespace with 5M extents, if you specify an INITIAL value of 1M, then Oracle creates five 1M extents.
    MINIMUM EXTENT
    The MINIMUM EXTENT clause lets you control free space fragmentation in the tablespace by ensuring that every used or free extent in a tablespace is at least as large as, and is a multiple of, integer. This clause is not relevant for a dictionary-managed temporary tablespace.
    Restriction on MINIMUM EXTENT
    You cannot specify this clause for a locally managed tablespace.

  • Resizing RBS datafile

    Could someone post the proper way to resize an RBS datafile (or point me to directions)? When I use the alter database command I get the error ORA-03297: file contains used data beyond requested resize value.
    Any help?
    Thanks, George

    I'm assuming that you are trying to resize the RBS tablespace smaller?
    If your Rollback segments have an OPTSIZE, I would issue an 'alter rollback segment <segment_name> shrink'. If there is not OPTSIZE, you can 'alter rollback segment <segmen_name> shrink to xxxM' where xxx can be your initial extent times 20.
    Try issuing your resize again.
    If that does not work, you may have to create another tablespace the size you want, create new rollback segment in that, then offline the other ones, online the new ones, and drop the old tablespace.

  • Oracle Database 11.2 Post-Upgrade error: ORA-01658: unable to create INITIA

    Hi,
    While upgrading of database 11.1.0 to 11.2.0, i am getting the below errors.
    SQL> @$ORACLE_HOME/rdbms/admin/utlu112s.sql
    Oracle Database 11.2 Post-Upgrade Status Tool 12-28-2011 23:26:45
    Component Status Version HH:MM:SS
    Oracle Server
    . VALID 11.2.0.1.0 00:33:27
    JServer JAVA Virtual Machine
    . VALID 11.2.0.1.0 00:14:04
    Oracle Real Application Clusters
    . INVALID 11.2.0.1.0 00:00:01
    OLAP Analytic Workspace
    . VALID 11.2.0.1.0 00:00:40
    OLAP Catalog
    . VALID 11.2.0.1.0 00:02:00
    Oracle OLAP API
    . VALID 11.2.0.1.0 00:00:32
    Oracle Label Security
    . OPTION OFF 10.2.0.3.0 00:00:00
    Oracle Enterprise Manager
    . LOADING 00:00:00
    Oracle XDK
    . VALID 11.2.0.1.0 00:01:10
    Oracle Text
    . VALID 11.2.0.1.0 00:01:52
    Oracle XML Database
    . VALID 11.2.0.1.0 00:04:49
    Oracle Database Java Packages
    . VALID 11.2.0.1.0 00:00:28
    Oracle Multimedia
    . VALID 11.2.0.1.0 00:12:37
    Spatial
    . INVALID 11.2.0.1.0 00:09:51
    Oracle Application Express
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-00942: table or view does not exist
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-00942: table or view does not exist
    . ORA-00942: table or view does not exist
    . ORA-00942: table or view does not exist
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-00942: table or view does not exist
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-00942: table or view does not exist
    . ORA-00942: table or view does not exist
    . ORA-00942: table or view does not exist
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-00942: table or view does not exist
    . ORA-00942: table or view does not exist
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-00942: table or view does not exist
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . ORA-01658: unable to create INITIAL extent for segment in tablespace HTMLDB
    . INVALID 3.2.1.00.10 00:33:43
    Gathering Statistics
    . 00:44:43
    Total Upgrade Time: 02:40:35
    PL/SQL procedure successfully completed.
    Please help me on this.
    Thanks,

    Vinod Ranjan wrote:
    Hi sb92075,
    Thanks for quick update,
    So is this related error is related to HTMLDB tablespace ?yes
    >
    Is this solution will workout?It depends upon actual size of new datafile added.
    So do as directed & report the results.
    What is current size of HTMLDB datafiles?
    >
    + Use ALTER TABLESPACE ADD DATAFILE to add additional space to the+
    + tablespace or retry with a smaller value for INITIAL +
    Thanks,
    Edited by: Vinod Ranjan on 31 Dec, 2011 7:43 AM

Maybe you are looking for

  • Mid-2010 Macbook Pro 13" Sleep Problems

    Recently, whenever my Macbook goes to sleep, it is unresponsive when I try to wake it up. I have to hold down the power button for a few seconds and force quit it with no indication that it is off, however, when I press the power button again, it tur

  • Mapping error in PI 7.4 dual stack

    Dear Experts,     Recently we upgraded our system from PI 7.1 to PI 7.4 dual stack. Scenerio is ECC->PI->SOAP(Webservice) synchronous Issue in detail:      We are creating a invoice in ECC system through PI its updating in third party site using SOAP

  • Late 2007 MacBook Pro Randomly Shuts Down

    I have a late 2007 15-inch MacBook Pro (A1226). It has a 2.20 GHz Core 2 Duo, 5 GB of memory (a stock 1 GB stick and a 3rd party 4 GB stick), and a stock 200 GB 7200 RPM Hitachi hard drive. I have had issues with it shutting down in certain situation

  • Why do I lose my tab apps and tab groups every time firefox updates to a new version?

    It seems like every time I get a new version of firefox my tab apps and groups disappear. Why does this happen and what can I do about it?

  • Scrambled image when I poke the "Show Photo Settings" button

    See the pdf file http://www.kvanderstel.com/iMovie_problem.pdf It doesn't matter is the image is a scan or a digital picture from a camera. When it does it, I click on the desktop and the image clears, I click back on iMovie and it does it again. If