Finding tablespace size in oracle if datafiles are autoextensibleor limited

Hi Guys,
it is may be simple but not getting through.. i am using below query to find in db that bytes used and bytes assigned at tablespace leve but not getting correct results.
i have tablesspaces whos size is intially 100mb for example and autoextensible on or limited or unlimited disk space but when i run below query it gives many 32768 values as maxbytes.. anything wrong with below query?? please correct me...
select tablespace_name, round( sum(bytes/(1023*1024) ))used_mb, round(sum( maxbytes/(1024*1024))) assigned_mb , autoextensible from dba_data_files group by tablespace_name,autoextensible
how to display correct values in all the sizes assigned in different scenarios??

Hi,
select
file_id
,tablespace_name
,autoextensible
,(bytes/1024/1024) bytes
,(maxbytes/1024/1024) Max_Bytes
from dba_data_files
where autoextensible='YES'
FILE_ID TABLESPACE_NAME                AUT      BYTES  MAX_BYTES
        43 TS_EZESECURE                   YES         17 32767.9844
        42 LARGE_TABB                      YES          1 32767.9844
        41 CAS_TAB                            YES          1 32767.9844
        40 XDB                                   YES         10 32767.9844
        39 USER_SIDEBET_TAB            YES         10 32767.9844
        38 BG_GAME_TABA                 YES         20 32767.9844
        37 BETS_PROMO                     YES         20 32767.9844
        36 BG_TABA                           YES         17 32767.9844
        35 PP_NPC_TABA                    YES         17 32767.9844
        34 BG_USERGAME_TABA           YES         17 32767.9844
        33 CWMLITE                            YES         17 32767.9844You want the table space with autoextensible...
I used only the part of the query of Navneet.. !!
- Pavan Kumar N

Similar Messages

  • Command for "How to find Cursor Size" in Oracle Stored Procedure"

    Hi
    Can u tell me....
    How to find Cursor Size" in Oracle Stored Procedure........
    I want command for that........

    why don't you try select count(*) from your_table;That requires running the same query twice - or rather running two different queries twice. Besides it still doesn't guarantee anything, because Oracle's read consistency model only applies at the statement level (unless you're running in a serialized transaction).
    This is such a common requirement - users are wont to say "well Google does it" - it seems bizarre that Oracle cannot do it. The truth is that that Google cheats. Firstly it guesses the number on the basis of information in its indexes and refines the estimate as pages are returned. Secondly, Google is under no onus to kepp all its data and indexes synchronized - two simultaneous and identical queries which touch different Google servers can return different results. Oracle Text works the same way, which is why we can get a count with CTX_QUERY.COUNT_HITS in estimate mode.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com
    .

  • How to check temporary tablespace size in Oracle 7?

    Hi,
    Anyone still using Oracle 7 ? I would like to know the sql to check the temporary tablespace and its datafile size.
    Thank,
    Regards,
    Eye Gee

    http://www.oracle.com/technetwork/documentation/oracle7-091910.html

  • Tablespace size monitoring in Oracle 10g

    Hello
    Our environment: Oracle 10.2.0.3 3-node RAC, ASM, Linux x86-64
    We are using EM Grid Control as a monitoring tool for RAC databases.
    We have "tablespace SPACE USED (%)" metric configured for all RAC databases.
    For some reason this metric does not work all the time and it does not alert dba when warning or critical threshold reached.
    I'd like to hear from people how they monitor tablespace size in Oracle RAC environment with files in ASM.
    Thank you,
    Yelena

    Yelena,
    Your problem is realted to GC and it seems it's not configured properly. Kindly check and verify schedule also. May possible it's notifying to other person also..

  • OS X Address Book + iPhone 4 + mobileMe - Are There Limits?

    OK... so with no love on the previous thread yet, I'm asking again for assistance but will take a different tact. I can't seem to find an answer to the question.
    Are there limitations and/or restrictions in OS X Address Book, iPhone 4 and/or mobileMe as to the number of data fields each contact can have or display?
    Please let me know.

    Figured out what was happening here. It seems that even though a new contact is synced immediately (from MobileMe to the iPhone), categorization data is NOT -- it seems to take hours until this data gets updated.
    Message was edited by: ScottBorisch

  • How to check/find the size of current ROLLBACK segment in oracle 10g

    How to check/find the size of current ROLLBACK segment in oracle 10g ? Kindly help

    A rollback segment name like "_SYSSMU231$" is used when you have Automatic Undo Management enabled.
    The only relevant parameters are :
    1. UNDO_MANAGEMENT=AUTO
    2. UNDO_RETENTION=n minutes ==> this is what everyone should be interested in
    3. The sizes of the Undo Tablespace datafiles and whether AUTOEXTEND is ON or OFF
    No one should be interested in the size of a single undo segment when Automatic Undo Management is enabled.
    Possible causes of ORA-01555 errors in Automatic Undo Management
    a. UNDO_RETENTION is too low
    b. Undo tablespace is too small
    Hemant K Chitale

  • Increase the Oracle datafile size or add another datafile

    Someone please explain,
    Is it better to increase the Oracle datafile size or add another datafile to increase the Oracle tablespace size?
    Thanks in advance

    The decision must also includes:
    - the max size of a file in your OS and/or file system
    - how you perform your backup and recovery (eg:do you need to change the file list)
    - how many disks are available and how they are presented to the OS (raw, LVM, striped, ASM, etc.)
    - how many IO channels are available and whether you can balance IO across them
    Personal default is to grow a file to the largest size permitted by OS unless there is a compelling reason otherwise. That fits nicely with the concept of BIGFILE tablespaces (which have their own issues, especially in backup/recovery)

  • Tablespace size report for SQL and oracle servers

     
       Hi All
      is it possible to get tablespace size for all sql and oracle server in the form of report in SCOM.
      Regards
      Madhavi

    Oracle: Table size report of Oracle is depend on the MP which yu imported into SCOM
    SQL :
    1) Create a group which contains folowing dynamic rule
    2) Reporting workspace --> Microsoft Gneric Report --> Performace Detail
    3) in the parameter area, create a new series, add group which create in step 1) and select the rule: MSSQL XXX: Collect Database Allocated Size(MB)
    4) Run the report
    5) In the report, click actions and select "Performance details for every object"
    Roger

  • Find original size of the datafile

    Friends,
    How to find original size of the datafile before autoexend on.Your help greatly appricated.
    Thanks
    Kumar

    You want to know with what size datafile was created?
    IMHO then look into alert.log - there will be full command with all options. Only You should have then alert.log from very begining.
    If You are using EM then look through space advisor, maybe there is some valuable information.

  • How to find the size of a Oracle 11g table

    I want to find the size of a table in Oracle 11g.
    I hope, my question is clear.
    Please revert with the reply to my query.
    Regards

    --- List all tables sorted by size
    set lines 100 pages 999
    col     segment_name     format a40
    col      mb           format 999,999,999
    select     segment_name
    ,     ceil(sum(bytes) / 1024 / 1024) "MB"
    from     dba_segments
    where     segment_type = 'TABLE'
    group     by segment_name
    order      by ceil(sum(bytes) / 1024 / 1024) desc
    --- List all tables owned by a user sorted by size
    set lines 100 pages 999
    col     segment_name     format a40
    col      mb           format 999,999,999
    select     segment_name
    ,     ceil(sum(bytes) / 1024 / 1024) "MB"
    from     dba_segments
    where     owner like '&user'
    and     segment_type = 'TABLE'
    group     by segment_name
    order      by ceil(sum(bytes) / 1024 / 1024) desc
    /

  • Query to find the size of db objects in bytes within a tablespace

    Is there a query by which i could find the size of all the db objects in bytes within a tablespace?

    Try
    SQL> select owner, segment_name, segment_type, bytes
      2  from dba_segments
      3  where tablespace_name = '<TABLESPACE NAME>'
      4  order by owner, segment_name;TABLESPACE NAME has to be uppercase.

  • Tablespace Reorganisation in Oracle 10g Database

    Dear All,
    I'm planning of doing a carrying out a Tablespace Reorganisation of the schema tablespace on the production server. I need your views regarding the process to be taken and tuning that is required before carrying out such an activity. For your information, the size of the tablespace is around 3TB. Also, since it is the production server, we can't have an outage for more than 24hrs. Hence, I would like some help from all of you in order to carry out this activity successfully in the time frame.
    Regarding the process :
    I have some ideas about how to do the tablespace reorganisation in oracle 10g. But, if I carry out the activity my way, its going it to take atleast 3-4 days to complete (which won't be acceptable).
    Areas of concern :
    1) Steps to perform the tablespace reorganisation in Oracle 10g DB.
    2) Size of the temporary tablespace before starting the Reorg.
    3) Any further suggestions / recomendations regarding tuning up of Oracle Parameters for enhancement of speed and acuracy of the activity.
    System Specifications :
    SAP - BI 7.0 (SAP NetWeaver 2004s)
    DB - Oracle 10.2.0.2.0, DBSL Patch Level - 158
    OS - AIX 5.3
    Looking forward to some good and prompt suggestions from all of you !!
    Please provide your valuable inputs.
    NOTE :: We have successfully performed the reorganization in the rest of the landscape on the same schema tablespace without any issues.
    Thanks and Regards,
    Deoraj Alok.

    It is quite an old thread, but let me put in my view points, which could help others.
    1. The Size of PSAPTEMP and PSAPUNDO tablespace should be 1.5*largest Table Size.
    2. Another Important thing is , if the time is in an issue, what you can do is to reorg. only top 50 largest tables where maximum space is being wasted. Folowing is the query to determine the TOP 50 tables which has the highest WASTED size.
    SELECT * FROM
    (SELECT
    SUBSTR(TABLE_NAME, 1, 21) TABLE_NAME,
    NUM_ROWS,
    AVG_ROW_LEN ROWLEN,
    BLOCKS,
    +ROUND((AVG_ROW_LEN + 1) * NUM_ROWS / 1000000, 0) NET_MB,+
    +ROUND(BLOCKS * (8000 - 23 * INI_TRANS) *+
    (1 - PCT_FREE / 100) / 1000000, 0) GROSS_MB,
    ROUND((BLOCKS * (8000 - 23 * INI_TRANS) * (1 - PCT_FREE / 100) -
    +(AVG_ROW_LEN + 1) * NUM_ROWS) / 1000000) "WASTED_MB",+
    Tablespace_Name
    FROM DBA_TABLES
    WHERE
    NUM_ROWS IS NOT NULL AND
    OWNER LIKE 'SAP%' AND
    PARTITIONED = 'NO' AND
    (IOT_TYPE != 'IOT' OR IOT_TYPE IS NULL)
    ORDER BY 7 DESC)
    WHERE ROWNUM <=50;
    I am sure that, only these 50 tables will reduce the maximum space and you can ignore rest of the tables.
    3. Even you can find out all the Tables which are having LONG and LONG RAW fields by using this query
    Select Distinct TABLE_NAME From dba_tab_cols Where Owner='SAPYSP' and (DATA_TYPE='LONG' OR DATA_TYPE='LONG RAW');
    Now, from the results of this query you can see how many Tables are present in the Top 50 Tables. There will be a few only and you can export/import these few tables in offline mode.
    4. After reorg, fi you want to claim the free disk space also, it would not be that easy because of the high water mark present in datafiles but you can try with
    Alter datafile <datafile id> resize <Size>M
    5. If free disk space is the first priority the you need to create another Table space (which should have size as big as it can have all the tables) and you re-organize in this new tablespace. After Reorg, drop the old tablespace and rename the new Table space with the old one (Rename Tablespace Command will work only in Oracle 10g).
    I hope this information helps all those who are going to do reorg in their respective projects. However, You can further put your question if in doubt and I will try to answer them.

  • How we find tablespace fragmentation and resolve this problem

    Hi,
    How we find tablespace fragmentation and resolve this in 10 G (R2) windows XP.
    Regards
    Faheem

    Hi,
    >>Are you using Dictionary Managed or Locally Managed Tablespaces...??
    In fact, there is no way to create a DMT if SYSTEM tablespace is LMT. So, what I said in my previous post "Unless the OP is using DMT ..." is impossible in Oracle 10g ...
    SQL> create tablespace tbs_test
      2      datafile '/u01/oradata/BDRPS/test01.dbf' size 5m
      3      extent management dictionary;
    create tablespace tbs_test
    ERROR at line 1:
    ORA-12913: Cannot create dictionary managed tablespace
    SQL> select extent_management from dba_tablespaces
      2  where tablespace_name='SYSTEM';
    EXTENT_MAN
    LOCALCheers
    Legatti

  • Tablespace usage in Oracle 11g

    Hi Guys,
    Not sure if this has been asked before.
    I have created a couple of table spaces in my database and one of these tables is holding all my data. For that table space, I have added at least 8 data files so far and it seems that Oracle uses the free space very quickly. I would like to know following things
    1. Is there anyway to know that usage of data files with respect to table stored in it? In other words - would I be able to know if Table-A stored in datafile 1?
    2. Is there anyway to reuse the old data files?
    3. I am not sure if it is an Oracle instance, but it seems to be that Oracle 11g uses the free space very quickly (I can understand that it depends on the data) so just curious to know if there is anyway to minimize the usage.
    Any information on this would be useful and appreciated.
    Thanks
    Regards
    Jiggy

    Is there anyway to know that usage of data files with respect to table stored in it? In other words - would I be able to know if Table-A stored in datafile 1? The tables are actually stored in the tablespaces itself , spanned to multiple datafiles. Query dba_segments and dba_extents to find out that in which tablespace and datafile(s) , your tables are spread across.
    Is there anyway to reuse the old data files?In what way? If it is a Locally Managed Tablespace, Oracle would reuse the space becoming free automatically within the tablespace for the subsequent data.
    I am not sure if it is an Oracle instance, but it seems to be that Oracle 11g uses the free space very quickly (I can understand that it depends on the data) so just curious to know if there is anyway to minimize the usage. No such thing at least in my knowledge. Space being used would solely depend on the incoming data and not on the release of the db.
    Aman....

  • Finding the size of db and size of used space

    Greetings all good people.
    Can you please help me find out about 2 database information?
    One, I want to find out the size of a database =size of physical files.
    and the size of data which is the size occupied in physical files.
    We are about to start a new project and there is a table on the database but it is empty.
    We want to be exporting data into this table but we want to make sure that there is enough space on the db before we start populating the table with data.
    I believe the code below just gives me the size of the database.
    select (bytes/1024/1024) as total_gigs from dba_segments where owner='BELL' and segment_name='$TABLE_NAME
    But I want to know the total size of the database and how much size has been used already, much the same as you would want to know the size capacity of a hard drive and how much of the size has been used.
    Sorry if my request is confusing.
    Thanks a lot in advance

    db size can be found out
    select sum(bytes)/1024/1024/1024 from dba_data_files ;
    and size of data is -- in the datafiles
    select sum(bytes)/1024/1024/1024 from dba_segemnts ;
    You can find out by below query .. the tablespace sizes -- would be DBSIZE
    used space -- would be the actual occupied space.
    select t.tablespace, t.totalspace as " Totalspace(MB)",
    round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
    nvl(fs.freespace,0) as "Freespace(MB)"
    from
    (select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
    from dba_data_files d
    group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
    from dba_free_space f
    group by f.tablespace_name) fs
    where t.tablespace=fs.tablespace (+)
    order by t.tablespace

Maybe you are looking for