Question on 'BYTES' in dba_free_space

I have 11gr2 db.
SQL> select sum(bytes)/1024/1024/1024 Gbytes_free
  2                 from  sys.dba_free_space
  3  where tablespace_name = 'AI_TS';
GBYTES_FREE
  29.328003
we have 29GB free for tablespace AI_TS
Let's see what those datafiles in the tablespace:
SQL> select sum(bytes)/1024/1024/1024 Gbytes_alloc,
  2                                sum(maxbytes)/1024/1024/1024 Gbytes_max        
  3                 from sys.dba_data_files
  4  where   tablespace_name= 'AI_TS';
GBYTES_ALLOC GBYTES_MAX
   63.839844  63.999969
We are alomst FULL!
Question , what the 'BYTES' in dba_free_space ABOUT?
THANKS!Edited by: msdba on Apr 11, 2013 4:36 PM

msdba wrote:
dpapde wrote:
bytes in dba_free_space means total free extents in the tablespace AI_TS. 29GB may or may not be contiguous extents
whereas
bytes in dba_data_files means size of file in bytes which is 63G
and
maxbytes in dba_data_files is max file size which is also 63G in case of AI_TS tablespace.I think the "wall" -- sun(maxbtes) as shown in the dba_data_files.
we are very close to the wall.
we should waste no time to increase the quota of maxsiize if data file or adding a datafile.
Let me if i took it wrong.Just remember that BYTES in DBA_DATA_FILES is simply the size of the file.
When I'm checking to see if a tablespace needs more space, querying dba_tablespace_usage_metrics is quick and easy:
SQL> select * from dba_tablespace_usage_metrics;
TABLESPACE_NAME                USED_SPACE TABLESPACE_SIZE USED_PERCENT
JUSTIN                                128          383710   .033358526
SYSAUX                             155544          534750    29.087237
SYSTEM                              94240          468190   20.1285803
TEMP                                    0          385247            0
UNDOTBS1                              160          384991   .041559413
USERS                                2984           16640   17.9326923I'll then use a query to see how data files are allocated and configured in the tablespace, and make any adjustments that are necessary.
column file_name format a60
set linesize 150
select t.tablespace_name, d.file_name, d.bytes/1024/1024 file_mb, d.maxbytes/1024/1024 max_file_mb,
d.autoextensible, ((d.increment_by*t.block_size)/1024/1024) increment_mb
from dba_data_files d, dba_tablespaces t
where d.tablespace_name = t.tablespace_name
and d.tablespace_name = '&tablespace';
Enter value for tablespace: JUSTIN
old   5: and d.tablespace_name = '&tablespace'
new   5: and d.tablespace_name = 'JUSTIN'
TABLESPACE_NAME                FILE_NAME                                                       FILE_MB MAX_FILE_MB AUT INCREMENT_MB
JUSTIN                         /u01/app/oracle/oradata/ORCL/datafile/o1_mf_justin_8mtx19z1_        100       10240 YES          100
                               .dbf

Similar Messages

  • Question about Byte Code

    Hello...can anyone tell me how I write a java program, compile it and get my byte code written into another file??
    Thanks in advance!

    I am looking to write my bytecode into a .bc file and
    open it and actually be able to read the bytecode
    instruction...(stuff like iload_2, i2d etc.,)I see... that was not clear from your first question. What you want is a disassembler. The SDK comes with one called 'javap': http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/javap.html

  • Questions about byte code

    1.How can a java program mutate and kill itself after running a certain times?
    i think the argorithm is to modify the byte code, but i don't know the structure of the byte code.
    for example:
    "int i=1156;
    victim.seek(i);
    int changed_byte=(int)victim.readUnsignedByte()+1;
    victim.seek(i);
    victim.writeByte(changed_byte);"
    how can i know that 1156 is the place that count the running times of the program. please help me and give the relevent pages to read, many thanks!

    In Mustang, the java.lang.instrument API has been extended to allow not only redefinition of classes, but also retransformation (without / with original bytes, respectively), so you could hook up a Java agent to transform classes at will. You could use this with 5.0, but you can't get the actual bytes for the current class from the JVM when retransforming classes. See http://java.sun.com/j2se/1.5.0/docs/api/java/lang/instrument/package-summary.html#package_description and http://download.java.net/jdk6/docs/api/java/lang/instrument/package-summary.html#package_description for more on instrumentation in 5.0 and (provisionally) 6.0.
    You might find a tool I've been working on lately useful: http://jen.dev.java.net/ - It basically presents a mutable class with a collections-ish interface and allows you to generate as bytes or a Class. It can be used in regular code, in agents, with .class files, byte arrays, java.lang.Classes, and so on.
    However, I would question your motivation here, particularly since you're using names like 'victim' and 'attacker'. You will struggle to do any of this is the user really doesn't want you to, since the platform is designed pretty well against it.

  • Question about byte code instructions

    Dear All,
    A method invocation (e.g., invokevirtual) needs its arguments to be prepared by the instructions above the method invocation instruction.
    As we know, some instructions pop objects out of the stack (eg, putfield), some instructions push objects onto the stack (eg, getfield), and some instructions do not change the state of the stack.
    My question is: are the instructions corresponding each argument preparation only those instruction that can push objects onto the stack, or could be any other?
    Thank you very much,
    -- Sunny

    When you say that arguments need to be prepared "above" the method invocation, it's more accurate to say before the method invocation.
    Typically, the stack is prepared with parameters which have been pushed onto it. But that's not just for method invocation. Simple operations such as "c = a + b" do not invoke any class methods, they are implemented by bytecode operations. If you had "myTestMethod ( a + b )", then the parameters preparation also includes calculations, the results of which are left on the stack for the method invocation.
    regards,
    Owen

  • Problem using byte indexed pixel format in setPixels method of PixelWriter

    I try to construct a byte array and set it to a WritableImage using PixelWriter's setPixels method.
    If I use an RGB pixel format, it works. If I use a byte-indexed pixel format, I get an NPE.
    The stride etc should be fine if I'm not mistaken.
    java.lang.NullPointerException
         at com.sun.javafx.image.impl.BaseByteToByteConverter.<init>(BaseByteToByteConverter.java:45)
         at com.sun.javafx.image.impl.General$ByteToByteGeneralConverter.<init>(General.java:69)
         at com.sun.javafx.image.impl.General.create(General.java:44)
         at com.sun.javafx.image.PixelUtils.getB2BConverter(PixelUtils.java:223)
         at com.sun.prism.Image$ByteAccess.setPixels(Image.java:770)
         at com.sun.prism.Image.setPixels(Image.java:606)
         at javafx.scene.image.WritableImage$2.setPixels(WritableImage.java:199)
    Short, self-contained example here:
    import java.nio.ByteBuffer;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.image.ImageView;
    import javafx.scene.image.PixelFormat;
    import javafx.scene.image.WritableImage;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    public class IndexedColorTestApp extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(Stage primaryStage) {
            BorderPane borderPane = new BorderPane();
            Scene scene = new Scene(borderPane, 600, 1100);
            primaryStage.setScene(scene);
            ImageView imageView = new ImageView();
            borderPane.setCenter(imageView);
            primaryStage.show();
            int imageWidth = 200;
            int imageHeight = 200;
            WritableImage writableImage = new WritableImage(imageWidth, imageHeight);
            // this works
            byte[] rgbBytePixels = new byte[imageWidth * imageHeight * 3];
            PixelFormat<ByteBuffer> byteRgbFormat = PixelFormat.getByteRgbInstance();
            writableImage.getPixelWriter().setPixels(0, 0, imageWidth, imageHeight,
                                                     byteRgbFormat, rgbBytePixels, 0, imageWidth * 3);
            imageView.setImage(writableImage);
            // this throws an NPE in setPixels()
            byte[] indexedBytePixels = new byte[imageWidth * imageHeight];
            int[] colorPalette = new int[256];
            PixelFormat<ByteBuffer> byteIndexedFormat = PixelFormat.createByteIndexedInstance(colorPalette);
            writableImage.getPixelWriter().setPixels(0, 0, imageWidth, imageHeight,
                                                     byteIndexedFormat, indexedBytePixels, 0, imageWidth);
            imageView.setImage(writableImage);
    }If there's no solution, maybe someone knows a workaround? We chose to use indexed format because of data size / performance reasons.
    Edited by: Andipa on 01.03.2013 10:52

    You have found a platform bug, file it against the Runtime project at => http://javafx-jira.kenai.com with your sample code and a link back to this forum question.
    Byte indexed pixel formats seem like a feature which was never completely (or perhaps even hardly at all) implemented to me.
    The PixelFormat type your failed case is using is (PixelFormat.Type.BYTE_INDEXED):
    PixelFormat<ByteBuffer> byteIndexedFormat = PixelFormat.createByteIndexedInstance(colorPalette);
    System.out.println(byteIndexedFormat.getType());These are the valid PixelFormat types =>
    http://docs.oracle.com/javafx/2/api/javafx/scene/image/PixelFormat.Type.html
    BYTE_BGRA
    The pixels are stored in adjacent bytes with the non-premultiplied components stored in order of increasing index: blue, green, red, alpha.
    BYTE_BGRA_PRE
    The pixels are stored in adjacent bytes with the premultiplied components stored in order of increasing index: blue, green, red, alpha.
    BYTE_INDEXED
    The pixel colors are referenced by byte indices stored in the pixel array, with the byte interpreted as an unsigned index into a list of colors provided by the PixelFormat object.
    BYTE_RGB
    The opaque pixels are stored in adjacent bytes with the color components stored in order of increasing index: red, green, blue.
    INT_ARGB
    The pixels are stored in 32-bit integers with the non-premultiplied components stored in order, from MSb to LSb: alpha, red, green, blue.
    INT_ARGB_PRE
    The pixels are stored in 32-bit integers with the premultiplied components stored in order, from MSb to LSb: alpha, red, green, blue.As the native pixel format for a WritableImage is not the same as the pixel format you are using, the JavaFX platform needs to do a conversion by reading the pixels in one format and writing them in another format. To do this it must be able to determine a PixelGetter for your PixelFormat (the PixelGetter is an internal thing, not public API).
    And here is the source the determines the PixelGetter for a given PixelFormat type:
    http://hg.openjdk.java.net/openjfx/8/master/rt/file/06afa65a1aa3/javafx-ui-common/src/com/sun/javafx/image/PixelUtils.java
    119     public static <T extends Buffer> PixelGetter<T> getGetter(PixelFormat<T> pf) {
    120         switch (pf.getType()) {
    121             case BYTE_BGRA:
    122                 return (PixelGetter<T>) ByteBgra.getter;
    123             case BYTE_BGRA_PRE:
    124                 return (PixelGetter<T>) ByteBgraPre.getter;
    125             case INT_ARGB:
    126                 return (PixelGetter<T>) IntArgb.getter;
    127             case INT_ARGB_PRE:
    128                 return (PixelGetter<T>) IntArgbPre.getter;
    129             case BYTE_RGB:
    130                 return (PixelGetter<T>) ByteRgb.getter;
    131         }
    132         return null;
    133     }As you can see, the BYTE_INDEXED format is not handled and null is returned instead . . . this is the source of your NullPointerException.

  • Size in Mb and Gb

    Hello Forum Mates...
    how to get sizes in mb and gb,
    for example take this statment
    SQL> select tablespace_name,sum(bytes) from dba_free_space group by tablespace_name;
    TABLESPACE_NAME SUM(BYTES)
    UNDOTBS1 7274496
    SYSAUX 9306112
    USERS 2097152
    PROD 5177344
    SYSTEM 5111808
    EXAMPLE 33292288
    may be ists a smaal and silly question but i need to know....
    thank you!

    Divide the number of bytes by 1024 to get kb. Divide by 1024 again to get MB. Divide by 1024 again to get GB.
    select tablespace_name,
           sum(bytes) num_bytes,
           sum(bytes)/1024 num_kb,
           sum(bytes)/1024/1024 num_mb,
           sum(bytes)/1024/1024/1024 num_gb
      from dba_free_space
    group by tablespace_name;Of course, you probably want to throw some ROUND calls in there to round the results to a reasonable number of decimal places. And I'm assuming that you're using normal person definitions of kb, MB, and GB rather than the definitions that hard drive vendors use :-)
    Justin

  • 11g RMAN UNDO backup optimization

    Hi all?
    I have tested 11g RMAN UNDO backup optimization
    1st I fill the undo tablespace by sql manipulations and not commiting
    2nd backed undo_ts up by RMAN (size 24m)
    3rd I made a commit
    Then backed undo tablespace again but backup_size didn’t change     (24m)
    Then I made some more manipulations and backed undo_ts again. This time backup_size reduced. (11m)
    Then I restarted db and backed up undo_ts again. This time backup size became what I expected (600K)
    The question is why 11g rman undo tablespace backup size didn’t reduce after commit?
    according to 11g undo optimization it had to
    SQL> select sum(bytes) from dba_free_space where tablespace_name = 'UNDOTBS2';
    SUM(BYTES)
    13172736
    SQL> begin
    for i in 1..100000 loop
    insert into testundo values(i);
    end loop;
    end;
    2 3 4 5 6
    PL/SQL procedure successfully completed.
    SQL> SQL> update testundo set
    id=2 where id>0;
    2
    update testundo set
    ERROR at line 1:
    ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS2'
    SQL> select sum(bytes) from dba_free_space where tablespace_name = 'UNDOTBS2';
    SUM(BYTES)RMAN> backup datafile 6;
    RMAN> list backup of datafile 6;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    10 Full *24.54M* DISK 00:00:04 10-JUN-10
    BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20100610T142437
    Piece Name: /home/oracle/flash_recovery_area/11GR1/backupset/2010_06_10/o1_mf_nnndf_TAG20100610T142437_611ctr1f_.bkp
    List of Datafiles in backup set 10
    File LV Type Ckp SCN Ckp Time Name
    6 Full 577669 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
    SQL> commit;
    Commit complete.RMAN> backup datafile 6 format 'after commit.backup';
    RMAN> list backup of datafile 6;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    11 Full *24.54M* DISK 00:00:02 10-JUN-10
    BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20100610T142541
    Piece Name: /home/oracle/product/11/Db_1/dbs/after commit.backup
    List of Datafiles in backup set 11
    File LV Type Ckp SCN Ckp Time Name
    6 Full 577705 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
    SQL> alter system archive log current;
    System altered.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from testundo;
    COUNT(*)
    100000
    SQL> delete from testundo;
    100000 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> insert into testundo values(1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter system flush buffer_cache;
    System altered.RMAN> backup datafile 6;
    RMAN> list backup of datafile 6;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    13 Full *11.03M* DISK 00:00:01 10-JUN-10
    BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20100610T143359
    Piece Name: /home/oracle/flash_recovery_area/11GR1/backupset/2010_06_10/o1_mf_nnndf_TAG20100610T143359_611dd8sz_.bkp
    List of Datafiles in backup set 13
    File LV Type Ckp SCN Ckp Time Name
    6 Full 578410 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
    RMAN>
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 393375744 bytes
    Fixed Size 1300156 bytes
    Variable Size 352323908 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 6197248 bytes
    Database mounted.
    Database opened.
    SQL> RMAN> backup datafile 6;
    RMAN> list backup of datafile 6;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    14 Full *600.00K* DISK 00:00:02 10-JUN-10
    BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20100610T152843
    Piece Name: /home/oracle/flash_recovery_area/11GR1/backupset/2010_06_10/o1_mf_nnndf_TAG20100610T152843_611hlwmv_.bkp
    List of Datafiles in backup set 14
    File LV Type Ckp SCN Ckp Time Name
    6 Full 580347 10-JUN-10 /home/oracle/oradata/11GR1/datafile/undotbs2.dbf
    Thanks in advance
    Turkel

    Hi Turkel,
    The space used for undo is also related to the undo retention setting.
    As it seems you do a test update and proceed with backups on:
    - 14:24:37 (-> 25M)
    - 14:25:41 (-> 25M)
    - 14:33:59 (-> 11M)
    - 15:28:43 (-> 600K)
    The first two backups probably are still within the undo retention period for the update.
    The third backup shows a partly empty undo (is your setting 900?).
    The last falls outside the retention period for the update resulting in the small backup size.
    Regards,
    Tycho

  • Thread 1 cannot allocate new log -- from alert log

    in my alert log file, I have noticed occasionally that this message was showing out during the business hour (8 am ~ 8 pm). Not often , maybe 3 or 4 times, but there are more during the midnight when system run some administration process such as KGL object name :SELECT /*+rule*/ SYS_XMLGEN(VALUE(KU$), XMLFORMAT.createFormat2('VIEW_T', '7')), KU$.OBJ_NUM ,K
    U$.SCHEMA_OBJ.NAME ,KU$.SCHEMA_OBJ.NAME ,'VIEW' ,KU$.SCHEMA_OBJ.OWNER_NAME FROM SYS.KU$_VIEW_VIEW KU$ WHERE KU$
    .OBJ_NUM IN (SELECT * FROM TABLE(DBMS_METADATA.FETCH_OBJNUMS(200001)))
    . My question is : Do I have to add another redo log file to system? and how much is proper?
    I also noticed there where message of "Memory Notification: Library Cache Object loaded into SGA
    Heap size 2829K exceeds notification threshold (2048K)" during that hours. Appreciate any advice. my system is 10g r2 on AIX 5.3 L.

    The "Thread cannot allocate new log" occurs more often off the regular hours due to system run process. It seems more regular occurring at evry 20 minutes. By OEM, I noticed thate there some system processes run at 2 am, 8 am, 2 pm, 8pm. for examples
    1) EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS();
    2) MGMT_ADMIN_DATA.EVALUATE_MGMT_METRICS;
    3) SELECT /*+ USE_HASH(f a) */ SUM(NVL(F.BYTES - NVL(A.BYTES, 0), 0)/1024/1024), SUM(NVL(F.BYTES, 0)/1024/1024) FROM (SELECT DISTINCT TABLESPACE_NAME FROM USER_TABLES) U, (SELECT TABLESPACE_NAME, SUM(BYTES) BYTES FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME) F, (SELECT TABLESPACE_NAME, SUM(BYTES) BYTES FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME) A WHERE A.TABLESPACE_NAME = U.TABLESPACE_NAME AND F.T...
    I wonder why they are necessary? or I have to ad one more redo log.

  • Pl/sql exception not caught.

    This program should give me an error "table or view does not exist" caught by the pl/sql exception, as dba_data_file1 table does not exist.
    However all that it returns is Input truncated to 3 characters
    Q1. Why?
    Q2. How can I remove this message "Input truncated to 3 characters. Where is this message comming from?
    #!/bin/ksh
    sqlplus -s << EOF
    abc/[email protected]
    set pages 0
    SET SERVEROUTPUT ON BUFFER 100000000
    BEGIN
    dbms_output.ENABLE(1000000);
    SELECT
    round(sum(bytes)/1024/1024/1024),
    round(sum(free_bytes)/1024/1024/1024),
    TRUNC(SYSDATE)
    from
    (SELECT tablespace_name, BYTES, 0 FREE_BYTES FROM dba_data_files1
    UNION ALL
    SELECT tablespace_name, 0, BYTES FROM dba_free_space
    union all
    SELECT tablespace_name, BYTES, 0 FROM dba_temp_files
    union all
    SELECT 'REDO-LOGS', b.BYTES, 0
    FROM v\\$logfile a, v\\$log b
         WHERE
    a.GROUP# = b.GROUP#);
         dbms_output.put_line("ok ");
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line("Error "||SQLERRCODE ||":"|| SQLERRM);
    exit 1
    END;
    exit 0
    EOF
    $> tstrun.ksh
    Input truncated to 3 characters

    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line("Error "||SQLERRCODE ||":"|| SQLERRM);
    exit 1
    END;
    if you catch exception, process it then you must reraise it. its a general mistake found when you are using others instead of name exception, so remember whenever you use others you must reraise the exception

  • Executing Native SQL query for oracle

    Hi,
    I want to run following native sql query but it is giving me error ora:933,
    DATA: BEGIN OF WA,
          TSP_NAME(255) TYPE C,
          PER_USAGE(10) TYPE C,
          END OF WA.
    EXEC SQL PERFORMING loop_output.
    select t.tablespace_name,'(' || TO_CHAR(ROUND(100*(NVL(b.bytes,0)/NVL(a
    .bytes,0)))) || '%)' "TSUsed%" from dba_tablespaces t,
    ( select tablespace_name, sum(bytes)/1024/1024 bytes
    from dba_data_files group by tablespace_name) a,
    ( select e.tablespace_name, sum(e.bytes)/1024/1024 bytes
    from dba_extents e group by e.tablespace_name ) b,
    ( select f.tablespace_name, sum(f.bytes)/1024/1024 bytes
    from dba_free_space f group by f.tablespace_name ) c
    where t.tablespace_name = a.tablespace_name(+) and
    t.tablespace_name = b.tablespace_name(+) and
    t.tablespace_name = c.tablespace_name(+) into :wa.
    ENDEXEC.
    Please provide me the soln
    Regards,
    Bharat Mistry

    ORA-00933: SQL command not properly ended.
    Try:
    EXEC SQL PERFORMING loop_output.
    select
    into :wa
    ENDEXEC.
    (No "." at the end). If that doesn't work, try ending it with a ";"
    Rob

  • To know the amount of free space in a tablespace

    hi,
    I'm learning oracle 9i release 9.2.0.1.0 .I'd created a tablespace 'TOOLS' for being used as the default tablespace for Statspack.
    I wish to know the amount of free space available in this tablespace. For this purpose I ran the following query but there was no rows selected :-
    SQL> select tablespace_name,bytes from dba_free_space
    2 where tablespace_name='TOOLS';
    no rows selected
    SQL> select name from v$tablespace;
    NAME
    CWMLITE
    DRSYS
    EXAMPLE
    INDX
    ODM
    SYSTEM
    TOOLS
    UNDOTBS1
    USERS
    XDB
    TEMP
    Can anyone tell the reason for this.

    I tried your query
    SQL> select TABLESPACE_NAME,
    2 sum(BYTES) Total_free_space,
    3 max(BYTES) largest_free_extent
    4 from dba_free_space
    5 group by TABLESPACE_NAME;
    ♀TABLESPACE_NAME TOTAL_FREE_SPACE LARGEST_FREE_EXTENT
    CWMLITE 11141120 10878976
    DRSYS 10813440 10813440
    EXAMPLE 131072 131072
    INDX 26148864 26148864
    ODM 11206656 11206656
    SYSTEM 3211264 3080192
    UNDOTBS1 199229440 196149248
    USERS 26083328 26083328
    XDB 196608 196608
    9 rows selected.
    Again there were no rows for TOOLS tablespace.

  • Problems with creating index

    I have over 1500MB free in tablespace
    I use for indexes. When I attempt to create
    index which should have about 300MB
    it ends with error ORA-01652
    unable to extend temp segment in tablespace
    where my indexes reside.
    Why Oracle needs so much space to create an index,
    is there any way to do it without increasing
    the size of tablespace?

    Oracle needs no extra space in the tablespace beyond what is required to hold the index (INITIAL plus any additional extents allocated). My guess would be that you do not have a large enough contiginous chunk of free space to hold an additional extent.
    If your tablespace is dictionary managed, look at the INITIAL, NEXT and PCTINCREASE parameters of your CREATE INDEX statement (or the tablespace defaults if you are not supplying them). Compare these to the sizes of the free space chunks in your index tablespace.
    SELECT file_id, block_id, blocks, bytes
    FROM dba_free_space
    WHERE tablespace_name = 'YOUR_INDEX_TBS'
    ORDER BY blocks DESCcompare the sizes of the first few rows here with the sizes of INITIAL and NEXT.
    HTH
    John

  • Add Unique Constraint - Unable to extend temp segment

    I'm getting the error "ORA-01652: unable to extend temp segment by 1024 in tablespace ...". I'm a developer, and our DBA is on vacation. I'm trying to understand what's happening, so I monitor V$SORT_SEGMENT while the constraint is being created. Here is what that view looks like immediately before and after the exception is thrown:
    10:43:07 < ... > select * from v$sort_segment;
    TABLESPACE_NAME                 SEGMENT_FILE SEGMENT_BLOCK EXTENT_SIZE CURRENT_USERS TOTAL_EXTENTS TOTAL_BLOCKS USED_EXTENTS USED_BLOCKS FREE_EXTENTS FREE_BLOCKS ADDED_EXTENTS EXTENT_HITS FREED_EXTENTS
    FREE_REQUESTS   MAX_SIZE MAX_BLOCKS MAX_USED_SIZE MAX_USED_BLOCKS MAX_SORT_SIZE MAX_SORT_BLOCKS RELATIVE_FNO
    TEMP                                       0             0         128             1           460     58880     460       58880            0           0           460         505          2809
                1       2809     359552           460           58880           460           58880            0
    Elapsed: 00:00:00.04
    10:43:13 < ... > select * from v$sort_segment;
    TABLESPACE_NAME                 SEGMENT_FILE SEGMENT_BLOCK EXTENT_SIZE CURRENT_USERS TOTAL_EXTENTS TOTAL_BLOCKS USED_EXTENTS USED_BLOCKS FREE_EXTENTS FREE_BLOCKS ADDED_EXTENTS EXTENT_HITS FREED_EXTENTS
    FREE_REQUESTS   MAX_SIZE MAX_BLOCKS MAX_USED_SIZE MAX_USED_BLOCKS MAX_SORT_SIZE MAX_SORT_BLOCKS RELATIVE_FNO
    TEMP                                       0             0         128             0           460     58880       0           0          460       58880           460         505          2809
                1       2809     359552           460           58880           460           58880            0
    Elapsed: 00:00:00.02My DBA had previously instructed me to issue this command to try to avoid this error:
    alter database tempfile '...' resize 12g;I do that, but I still only show 460 free segments. Can someone point me to some documentation on how to make the Free Extents be larger than 460?
    Here's my client info:
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 6 10:40:39 2012
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.Here's my server info:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    Given that you appear to be able to add/increase temp files, you are also likely to be able to see the dba_* views. As a first shot, try:
    select sum(bytes) from dba_free_space
    where tablespace_name = <name from the error message>If there appears to be sufficient space (no idea what that would be since I do not know how big your objects are) then try something like:
    select file_id, block_id, bytes from dba_free_space
    where tablespace_name = <name from the error message>
    order by bytes descIf you have large amounts of contiginous free space (i.e. the first few rows have a large value for the bytes column) then ther may be something else going on.
    If both queries show relativel small values for the amount of free space, you will need to add another datafile to the tablespace, or increase the size of one of the existing datafile.
    To see the datafiles in the tablespace use:
    select file_name, bytes from dba_data_files
    where tablespace_name = <name from the error message>You can increase the size of a datafile using something similar to the alter database command you have for the tempfiles like:
    alter database datafile <a quoted full name from dba_data_files> resize some bigger numberJust make sure that the file system has enough free space for the new size.
    John

  • SQL about usage size

    Dear All
    I am beginner to use Oracle 11g.
    I want to create an SQL check the usage size of Exadata.
    · Instance name (v $ instance)
    ・Usage Size (of the total Exadata, what percentage do you use).
    Similarly, the percent you want to create an SQL check tablespace for each instance used.
    · Instance name (v $ instance)
    · Tablespace name
    ・ Size of usage Tablespace (one instance of, or use a percentage)
    For these two SQL,I will grad to send coomment.
    Thanks you.

    select d.status,
           db.name dbname,
           d.tablespace_name tsname,
           d.extent_management,
           d.allocation_type,
           to_char(nvl(d.min_extlen / 1024, 0),
           '99G999G990D90', 'NLS_NUMERIC_CHARACTERS = '',.'' ')
           "ALLOC_SIZE (K)",
           d.contents "Type",
    case
    when(d.contents = 'TEMPORARY') then
           to_char(nvl(a.bytes / 1024 / 1024, 0),
           '99G999G990D90', 'NLS_NUMERIC_CHARACTERS = '',.'' ')
    else
           to_char(nvl(t.bytes / 1024 / 1024, 0),
           '99G999G990D90', 'NLS_NUMERIC_CHARACTERS = '',.'' ')
    end as "Size (M)",
           to_char(nvl((a.bytes - nvl(f.bytes, 0)) / 1024 / 1024,   0),
           '99G999G990D90', 'NLS_NUMERIC_CHARACTERS = '',.'' ')
           "Used (M)",
           to_char(nvl((a.bytes - nvl(f.bytes, 0)) / a.bytes * 100,   0),
           '990D90', 'NLS_NUMERIC_CHARACTERS = '',.'' ')
           "Used (%)"
    from sys.dba_tablespaces d,
          (select tablespace_name,
             sum(bytes) bytes
            from dba_data_files
       group by tablespace_name)
    a,
        (select tablespace_name,
            sum(bytes) bytes
           from dba_temp_files
          group by tablespace_name)
    t,
        (select tablespace_name,
           sum(bytes) bytes
          from dba_free_space
         group by tablespace_name)
    f,
      v$database db
         where d.tablespace_name = a.tablespace_name(+)
           and d.tablespace_name = f.tablespace_name(+)
           and d.tablespace_name = t.tablespace_name(+)
         order by 10 desc

  • ORA-01653: unable to extend table... problem

    Hello.
    I'm using Oracle 8i 8.1.5.0.2 SE on Adelinux 6.2(kinda localized version of RedHat 6.2).
    When I run my Pro*C module, the following error message appeared even though there's enough free space on that tablespace.
    ORA-01653: unable to extend table UALMAS.TBL_OPTIONS_T by 466608 in tablespace TALMAS
    The free space of TALMAS tablespace is as follow:
    --->> cut here <<---
    SQL> SELECT TABLESPACE_NAME,BYTES FROM DBA_FREE_SPACE;
    TABLESPACE_NAME BYTES
    TALMAS 284839936
    TALMAS 204271616
    TALMAS 732184576
    TALMAS 846002176
    TALMAS 547749888
    TALMAS 305330176
    TALMAS 194267136
    TALMAS 50661376
    TALMAS 561453056
    TALMAS 108539904
    10 rows selected.
    --->> cut here <<---
    I use COMMIT at the end of some part of insertion, and the free space listed is not the result of rollback I think.
    Does anyone have such an experience?
    Can anyone tell me how to solve this problem?
    Any comment would be appreciated.
    @Wings... of Icarus
    null

    Hi,
    Maxsize unlimited means the maxsize of 32GB. Check if your tablespace is reaching its maxsize, you may have to add a datafile to the tablespace. Sometime, maxfile is not reached but you do not enough disk in the file system to extend the tablespace. So check the file system utilization as well.
    HTH

Maybe you are looking for

  • Mails trun automatically to read status

    Dear All ,    We are facing one problem in our mail sender adapter. sometimes the mails in inbox  turn as read from unread status automatically.   We don't know what is the exact resaon. We are using IMAP protocol. Please Help us Regards Xi User

  • Nokia 5233 lining on screen

    Good day Sir, i am having a screen problem with my Nokia 5233, when my phn stay for about 5min , there some lining on the screen like a screen server and it is impossible for me to detect my incoming caller, i have experience this for about a month,

  • Error in External programe

    Dear All, We are facing error in one of external programe; which is included in one of step of a job. the programe is 'sleep' which is resposible for inserting delay in job e.g. 300 sec. the value 300 is the parameter for the external programe. when

  • Unable to install any theme or extension in FireFox

    I am using firefox 1.5.6 but, not able to install any theme or extension. Every time it's giving message Firefox could not download the file at http://....................(url of download site) Download error. I am able to download other files perfec

  • How do I get dreamweaver onto my new computer

    I downloaded Dreamweaver onto my computer. It's the student verstion so I think I'm allowed to have it only on one computer. I'd like to have it on my new computer, but don't see where I have the option to download it again. thanks for your help cath