Sql query to find out the space issues in not able to allocate next extent

hi,
i have oracel 11g on linux.
my datafiles are autoextend off. i am looking for query to make sure the segments does not stop growing by reaching the maximum segment allocated or no free contigous space available in allocating new extent,.
i need to know periodically the owner,object_name and object type (table or index) which are suffocating for space.
any ad-hoc sql query exists?
thanks in advance.

Connect as sysdba and try..
To list all objects >100M in size.
SQL> select owner, segment_type, segment_name, sum(bytes)/(1024*1021) from dba_segments
group by owner, segment_type, segment_name
having sum(bytes)/(1024*1021) > 100
For tablespaces ..
select tablespace_name, sum(bytes) tablespace_size
from dba_data_files
group by tablespace_name
union all
select tablespace_name, sum(bytes) tablespace_size
from dba_temp_files
group by tablespace_name
order by tablespace_name

Similar Messages

  • Query to find out the time used by an user for an application

    Hello All,
    I want to know the query to find out the whole time used by the user for an application. Please view the below data
    Employee:
    SNO EMP_ID EMP_NAME EMP_DATE LOGIN_TIME LOGOUT_TIME
    1 10 Visu 21-Nov-2010 06:30:00 07:30:00
    2 10 Visu 21-Nov-2010 06:40:00 07:20:00
    3 10 Visu 21-Nov-2010 06:50:00 07:50:00
    4 10 Visu 21-Nov-2010 07:30:00 08:30:00
    5 10 Visu 21-Nov-2010 09:30:00 10:30:00
    By checking the above data we can say that the total time Visu used the application is
    8.30 - 6.30 (From 1,2,3,4 records) = 2hrs
    10.30 - 9.30 (Based on 5th rec) = 1hr
    So the total time Visu used the application would be 3 hrs = 180 mins.
    Could you please help me in getting the result from that data using a query?

    odie_63 wrote:
    I think it may be solved with analytics too.
    with t1 as (
                select 1 sno,10 emp_id,'Visu' emp_name,'21-Nov-2010' emp_date,'06:30:00' login_time,'07:30:00' logout_time from dual union all
                select 2,10,'Visu','21-Nov-2010','06:40:00','07:20:00' from dual union all
                select 3,10,'Visu','21-Nov-2010','06:50:00','07:50:00' from dual union all
                select 4,10,'Visu','21-Nov-2010','07:30:00','08:30:00' from dual union all
                select 5,10,'Visu','21-Nov-2010','09:30:00','10:30:00' from dual
         t2 as (
                select  emp_id,
                        emp_name,
                        emp_date,
                        to_date(emp_date || login_time,'DD-MON-YYYYHH24:MI:SS') login_time,
                        to_date(emp_date || logout_time,'DD-MON-YYYYHH24:MI:SS') logout_time
                  from  t1
         t3 as (
                select  t2.*,
                        case
                          when login_time < max(logout_time) over(
                                                                  partition by emp_id,emp_date
                                                                  order by login_time
                                                                  rows between unbounded preceding
                                                                           and 1 preceding
                            then 0
                          else 1
                        end start_of_group
                  from  t2
         t4 as (
                select  t3.*,
                        sum(start_of_group) over(partition by emp_id,emp_date order by login_time) grp
                  from  t3
         t5 as (
                select  emp_id,
                        emp_date,
                        min(login_time) login_time,
                        max(logout_time) logout_time
                  from  t4
                  group by emp_id,
                           emp_date,
                           grp
    select  emp_id,
            numtodsinterval(sum(logout_time - login_time),'day') time_spent
      from  t5
      group by emp_id
      order by emp_id
        EMP_ID TIME_SPENT
            10 +000000000 03:00:00.000000000
    SQL> SY.

  • Query to find out the list of user who have delete access

    Hi,
    I need a query to find out the list of users who have delete access on perticular folder/universe/ reports  in infoview.
    Please advice.
    Regards,
    Neo.

    orton607 wrote:
    thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
    thanks,
    ortonThis is not possible. The best you could do is to have a good guess.
    Or how would you parse some dynamic statement as this:
       v_suffix := 'loyees';
       v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
       execute_immediate(v_sql);
    ...What is the table name? How do you want to parse that?
    Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts.

  • Query to find out the Activities done against a table

    Hi,
    One table has been truncated and data reloaded into the table by the user. But at latter stage user deny that activity. I believe all these activities stored in any oracle 10g database table.
    Need a query to find out the activities done on a specific date say 6th Sep.
    This is too urgent. Thanks in advance

    Hi,
    Welcome to the forum!
    If you don't have enable table auditing maybe you can see last_ddl_time column of user_objects view:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> select * from test2;
          COL1       COL2       COL3
             1          1          3
             1          2          3
             1          3          3
    SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
    TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
    12/09/2009 12:20:26            12/09/2009 12:20:27
    SQL> truncate table test2;
    Table truncated
    SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
    TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
    12/09/2009 12:20:26            12/09/2009 14:01:21
    SQL> Regards,

  • SQL Query to Find out User has what all resources provisioned !

    Hi Guys ,
    Does any one have a SQL query to find out what resources are provisioned to a particular user ?
    Thanks
    Suren

    Hi,
    Hope this will help you.
    SELECT distinct usr_login as "IdM User ID",
    usr_employeeID as "Employee ID",
    usr.USR_FIRST_NAME as "First Name",
    usr.USR_LAST_NAME as "Last Name",
    usr_status
    as "User Status",
    USR_EMP_TYPE as "Employee Type",
    obj.obj_name as "Application Resource",
    ost_status as "Application Resource Status",
    FROM ost,oiu,obj,usr,obi
    WHERE oiu.ost_key = ost.ost_key AND obj.obj_key = obi.obj_key AND oiu.usr_key = usr.usr_key
    AND ost_status in ('Provisioned','Revoked','Disabled', 'Provisioning')
    AND oiu.obi_key=obi.obi_key
    AND usr_EmployeeID like '11111'
    This query will provide all the resources to which the user is linked with and the resource status is in 'Provisioned','Revoked','Disabled', 'Provisioning' status for a particular employeed ID, I am not completely sure whether I have given the Employee ID column from USR table as correct or not. Verify once and query the DB

  • Need query to find out the sum till a period

    Hi,
    I need to write one query to find out the cumulative sum of raw_cost of table pa_budget_lines till the specified period, I tried to do this by analytical function, but that is not working in Report 10g. Can anybody help me in this.
    Thanks

    not familiar with report but could you do something like this
    with t as
      select 1 grp, 10 * level the_cost, add_months (sysdate,  level) effective_dt from dual connect by  level < 11 union all
      select 2 grp, 5 * level the_cost, add_months (sysdate,  level) effective_dt from dual connect by  level < 11
    input as
      ( select null grp, null the_cost, null running_total,  v_eff_dt effective_dt   from dual)
    select * from(
    select t.grp, t.the_cost, sum(t.the_cost) over (partition by t.grp order by t.effective_dt) running_total, t.effective_dt,
           lead(t.effective_dt) over (partition by t.grp order by t.effective_dt) next_effective_dt,
           input.effective_dt  inp_eff_dt
    from t, input
    where inp_eff_dt between effective_dt and next_effective_dtv_eff_dt would be the input date you are interested in

  • Need to find out the queries which did not executed in 2014

    Hi All,
    I need to find out the queries which start from YY  and did not executed in 2014, earlier we used to find out by looking into the technical content cube 0TCT_C02 but now its giving dump as number of queries increases. I tried to find out using table RSZCOMPDIR but not able to trace it exactly. Please suggest some alternative solution to find out the queries which did not execute in 2014 so that we can delete it.
    Thanks,
    Asim.

    Hi,
    RSDDSTAT_OLAP : This is the table which contains query execution details
    CALDAY field in that table gives you query execution date
    OBJNAM gives the query name
    As you said RSZCOMPDIR gives list of all queries. doing a lookup between these tables will identify the queris which are not executed in particular period.
    -Sriram

  • Query to find out the free disk space on C: drive

    Hi Guys,
    I am trying to create a query in  Queries section under Monitoring, To find out the free disk space of C: drive.
    Am using the below query, but it shows lot many fields, I need only Machine names of the collection and their
    Free Disk Space on C: drive
    select * from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceId = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.DeviceID = "C:" and SMS_G_System_LOGICAL_DISK.FreeSpace > 1024
    Please assist

    The SELECT part of the query will govern what fields you are shown, so perhaps try:
    Select SMS_R_System.ResourceID, SMS_R_System.NETBIOSname, SMS_G_System_Logical_Disk.FreeSpace
    from SMS_R_System
    inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceId = SMS_R_System.ResourceId
    where SMS_G_System_LOGICAL_DISK.DeviceID = "C:" and SMS_G_System_LOGICAL_DISK.FreeSpace > 1024
    I hope that helps,
    Nash
    Nash Pherson, Senior Systems Consultant
    Now Micro -
    My Blog Posts
    If you found a bug or want the product to work differently,
    share your feedback.
    <-- If this post was helpful, please click the up arrow or propose as answer.

  • Need sql query to find out same item is used in open po and closed po

    Hi Experts,
    I have an requirement is that, i need to find out the item is used in open po and closed po.
      example: A is the item is used in closed PO and Open PO.
      i need to write down the scripts how many same items is used in open po and closed po.
    if any sql script is there please share.
    Please let us know if any concerns.
    Thanks
    bmn

    Hi
    Please try below query
    select
    distinct c.segment1
    from
    po_lines_all a,
    po_line_locations_all b,
    mtl_system_items_b c
    where
    a.po_line_id= b.po_line_id
    and a.item_id=c.inventory_item_id
    and b.closed_code='OPEN'
    and a.item_id in ( select 
    item_id
    from
    po_lines_all d,
    po_line_locations_all e,
    mtl_system_items_b f
    where
    d.po_line_id= e.po_line_id
    and d.item_id=f.inventory_item_id
    and e.closed_code in ('CLOSED','FINALLY CLOSED','CLOSED FOR INVOICE','CLOSED FOR RECEIVING'));

  • Query to find out the list of tables used in a package

    hello,
    can anyone please help me out with a query; i want to find out the list of tables used by a particular package.
    thanks,
    orton

    orton607 wrote:
    thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
    thanks,
    ortonThis is not possible. The best you could do is to have a good guess.
    Or how would you parse some dynamic statement as this:
       v_suffix := 'loyees';
       v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
       execute_immediate(v_sql);
    ...What is the table name? How do you want to parse that?
    Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts.

  • Please let me know a good query to find out the memory being used in DB

    Hi All,
    We are using Automotic memory management by using parameter memory_target option. I want to find out the total memory being used and which is free.
    ie;(SGA+PGA). Please let me know.
    Thanks & Regards,
    Vikas Krishna

    Since we are using memry_target we will not get an accurate value there I guess.
    SQL> show parameter memory
    NAME TYPE VALUE
    hi_shared_memory_address integer 0
    memory_max_target big integer 12G
    memory_target big integer 12G
    shared_memory_address integer 0
    SQL> select round(used.bytes /1024/1024 ,2) used_mb
    2 , round(free.bytes /1024/1024 ,2) free_mb
    3 , round(tot.bytes /1024/1024 ,2) total_mb
    4 from (select sum(bytes) bytes
    5 from v$sgastat
    6 where name != 'free memory') used
    7 , (select sum(bytes) bytes
    8 from v$sgastat
    9 where name = 'free memory') free
    10 , (select sum(bytes) bytes
    11 from v$sgastat) tot;
    USED_MB FREE_MB TOTAL_MB
    1660.92 378.71 2039.62
    Thanks & Regards,
    Vikas Krishna

  • Query to find out the table name and column name..

    Hi Experts,
    I have an Oracle DB in which has more than 50 tables and 100,000 records. I want to get the record which contains *"ITxtVarValue references a non existing text"* the text.
    Is there any query there to find out the table name and column name of this particular record where it reside?
    Please help. Any help will be rewarded.
    Thanks,
    G

    Using this forum's search function, I found a thread that should give you an idea: How to find out a tablename
    C.

  • SQL query to find out last login for each database

    Hi everybody,
    I have a view with following columns:
    DatabaseSid, lastLogin, firstLogin.
    I want to now the newest last_login date for every database.
    SID First Login Last Login
    e.g. Database1, 11.11.2011, 01.12.2011
    Database1, 01.04.2012, 01.05.2012
    Database3, 03.03.2004, 03.06.2005
    Database 3 07.09.2012, 12.10.2012
    How can I do a query to find out for eacht DB (DB1, DB2 and so on) the Last_Login Date?
    Thank you in advance
    Steve

    Steve wrote:
    Hi everybody,
    I have a view with following columns:
    DatabaseSid, lastLogin, firstLogin.
    I want to now the newest last_login date for every database.
    SID First Login Last Login
    e.g. Database1, 11.11.2011, 01.12.2011
    Database1, 01.04.2012, 01.05.2012
    Database3, 03.03.2004, 03.06.2005
    Database 3 07.09.2012, 12.10.2012
    How can I do a query to find out for eacht DB (DB1, DB2 and so on) the Last_Login Date?
    Thank you in advance
    SteveI'm curious as to how you collect this information from multiple databases into one database, and of what value the data is once you have it.

  • How to find out the customers who are not performed transaction

    Hi Experts,
    My all transactions in my cube and my customer records in my master data now i want to find out the customers how didn't perform transaction..
    can somebody give me idea...
    Thanks
    Kiran Kumar

    Hi,
    possible solution:
    - make IObj customer as infoprovider (RSD1)
    - Create a multiprovider having your cube (your trans data) and your customer master
    - identify cube-customer with iobj-customer
    - create a query on thi multi and filter one of the characteristic of your cube, e.g. document number or calendar day, with # (not assigned)
    - drilldown the customer.
    This will give you all the customers having no fact in your transactional data.
    You can also have your query without the filter; in this case, one of your cube key figure will be 0 (or empty) for those customers...
    hope this helps
    Olivier..

  • How can I find out the overall time and not only the time of a single clip?

    I have set up two cameras in one room. Both cameras record the same thing from different perspectives at the same time. I have found an interesting scene for video 1 (recorded by camera 1). Now I would like to find the time at which the interesting scene takes place in video 2.
    However, I have not seen any way to get displayed, at what time the scene starts in relation to the total length of the video (e.g: scene starts after 5 minutes from total 10 minutes).
    The indicated time refers only to a part of the clip and not to the overall project, even if a special clip is not selected. Does anyone know, how I can find out the time?

    Go to Settings>iCloud>Storage & Backup.  It will be shown just below the Back Up Now button at the bottom.

Maybe you are looking for

  • Adobe premiere elements 10 install error on mac

    I have tried to install the Premiere elements 10 on mac and fails every time with the following error Exit Code: 7 -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 8 error(s), 7 warning(s) WARN

  • Is it possible to save videos to my iphone and watch them on my ipad (while on a plane - bluetooth?) without wifi?

    I have a business trip to Sydney Australia coming up in a few months (from Vancouver). I'm still new to the whole Apple experience and wondered if there is any way to sync your iPhone and iPad without wifi, allowing me to save movies to my phone yet

  • Issue related to DB Schema

    Hi, Iu2019m facing an issue with Crystal Report. I donu2019t have that much experience in using CR with .NET. I have simply created two reports: 1.       Report1.rpt using dbo.table1 2.       Report2.rpt using .table2 I have to show this report in a

  • RSS Feed XML iView Suffix

    Hi, we created a XML iView for a RSS Input. Out problem is, if the rss - feed ends upon .xml everything work fine. Unfortunatly our RSS - feed URL does not end with .xml and so the iView produces only an error message. Does anyone know how to configu

  • Best method of importing from external drive?

    I have a 1T LaCie and want to know the best method to get those images into LR. The defaults are: "Add" and "NewPhotos" to "MyCatalog" I think I may have more than one catalog and am not certain how to combine them. Is it best practice to have only o