How to exclude recycling bin from tablespace usage calculations

I have a generic query to tell me how much of a given tablespace is used. I want to exclude objects in the recycling bin.
in dba_segments these segments all have names that begin with BIN$
This is not the case in dba_extents where we get the calculations from. How do I exclude objects in the recylcing bin? Basically how do I exclude segments in dba_extents that are in the recycling bin
select      f.tablespace_name,a.total,
     u.used,f.free,
     round((u.used/a.total)*100) "% used",
     round((f.free/a.total)*100) "% Free",
     round(((0.10*u.used)-f.free)/0.9) "10%",
     round(((0.15*u.used)-f.free)/0.85) "15%",
     round(((0.20*u.used)-f.free)/0.8) "20%",
     round(((0.25*u.used)-f.free)/0.75) "25%"
from
(select tablespace_name, sum(bytes/(1024*1024)) total from dba_data_files group by tablespace_name) a,
(select tablespace_name, round(sum(bytes/(1024*1024))) used from dba_extents group by tablespace_name) u,
(select tablespace_name, round(sum(bytes/(1024*1024))) free from dba_free_space group by tablespace_name) f
WHERE a.tablespace_name = f.tablespace_name
and a.tablespace_name = u.tablespace_name
and a.tablespace_name=TRIM(UPPER('&&TS_NAME'))
/

You could join the two views or you could use dba_segments rather than extents in your query or you could use the built-in functionality rather than writing your own.
http://www.morganslibrary.org/reference/dbms_space.html
DBMS_SPACE.FREE_BLOCKS
DBMS_SPACE.UNUSED_SPACE

Similar Messages

  • How to exclude salary arrears from pension deduction?

    I have setup a pension retro element and its calculating the retro amount correctly.
    However, its using sum of salary arrears (say,arrears for the month of March and April) and adding that to May salary and deducting pension on the total sum.
    (we do not want this, we want only May salary to be considered for pension retro element)
    Does anyone know how to exclude salary arrears from pension deduction element? Is there any obvious step, which I am missing in while defining the element?

    Hi,
    While doing retro for arrears, it will give at a time in one payroll only, no standard for installment payments.
    2nd option:
    Calculate the Total Arrears amount and divide it by four installments and through IT 0014 with New wage type and give for 4 months as start and end date.
    * you have to create a new wage type which is taxable and assigned to IT 0014.
    * add this new wt in Remuneration form in Earnings side.
    Regards,
    Praneeth kumar

  • How to exclude some tables from schema level replicatio????

    Hi,
    I am working on oracle10g stream replication.
    My replication type is "Schema Based".
    So can anyone assist me to undersatnd, how to exclude some tables from schema based replication.
    Thanks,
    Faziarain

    You can use rules and include them in the rule set, lets say you dont want LCR to be queued for table_1 in schema SALES, write two rules one for DDL and another for DML with NOT logical condition.
    DBMS_RULE_ADM.CREATE_RULE(
    rule_name => 'admin.SALES_not_TALBE_1_dml', condition => ' (:dml.get_object_owner() = ''SALES'' AND NOT ' ||
    ' :dml.get_object_name() = ''REGIONS'') AND ' ||
    ' :dml.is_null_tag() = ''Y'' ');
    DBMS_RULE_ADM.CREATE_RULE(
    rule_name => 'admin.hr_not_regions_dlll',
    condition => ' (:dml.get_object_owner() = ''SALES'' AND NOT ' ||
    ' :ddl.get_object_name() = ''table_!'') AND ' ||
    ' :dsl.is_null_tag() = ''Y'' ');
    just go through this document once, http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_rules.htm#i1017376
    Edited by: user8710159 on Sep 16, 2009 5:21 PM

  • How to exclude schema name from exported files (PL SQL Developer)

    Dear all,
    Just one question: I am using PL SQL Developer. My goal is to export some data (as .sql and .dmp files) from one database and to import them into the another database (both databases have identical structure - test database and production, just different database names and names of schema. In order to make it possible, I need to exclude schema name from generated export file. I believe that it is possible to do it automatically by setting up parameters of PL SQL Developer. How?
    Thank you in advance,
    Kindest regards,
    Dragana

    In the meantime, I have found the answer on my previous question:
    Actually, the initial idea (how to exclude schema name from exported files) was wrong. No need for any intervention.
    Trick is: Schema name can be changed during the import of exported files (PL SQL Developer during import gives possibility: From User (old schema) To User (new schema) .
    Hope that this will be useful info for others.
    Dragana

  • How to exclude UNDO and temp tablespace using monitoring template

    hi,
    as per MOS note id 816920.1 undo and temp tablespace is excluded from monitoring starting version 11G onwards.It says that thresholds will need to be explicitly set if undo and temp needs to be monitored
    we have grid 12C implemented now with monitoring templates which sets thresholds for all tablespaces. does it apply that thresholds to undo and temp too?? we are receiving alerts for undo and temp tablespaces and we wish to disable them. We have undo tablespaces with different names in many databases as per naming conventions for that line of business.
    How can i exclude undo and temp tablespaces from monitoring using grid 12C monitoring templates. is there a way through templates where i can set thresholds of permanent tablespaces only???

    In EM12c, go to the 'Enterprise' menu, then 'Job', then 'Library'. There should be an out-of-the-box job called "DISABLE TABLESPACE USED (%) ALERTS FOR UNDO AND TEMP TABLESPACES" that you can run against your database targets, and that job will disable database-generated alerts.
    If a previous admin has set up EM12c-generated alerts for undo and temp, then yes, a monitoring template will take care of disabling them. Either remove those alerts from the existing monitoring template and apply them to your targets, or create a new monitoring template based on one database's current settings, remove those warning/critical thresholds for your undo and temp tablespaces, and apply it to your targets.

  • How to exclude Web App from search results

    Hi
    Search results link to a unstyled Web App instead to the actual page it resides in.
    Please do this:
    1. go to: http://kinship.businesscatalyst.com/
    2. search for "Michael" on the top global search
    3. on the search results page click on the name (link).
    4. you will see Michael's web app item not the actuall page it resides in (http://kinship.businesscatalyst.com/About/the-team)
    How to avoid getting web app results in search?
    Thanks
    Micha

    Hi Micha
    Just add “&OT=35 “ at the end of the action in your search form:
    Ex:
    <form name=”xxxx” method=”post” action=”/Default.aspx?SiteSearchID=3566&amp;ID=/results&OT=35”>
    <div class=”search-box”><input type=”text” class= ............../>
    <input type=”submit” class=”cat_button” value=”search” />
    </div>
    </form>
    Here are the rest of the content types IDs, should you come across similar situations in the future:
    Web Pages = 1
    Literature = 6
    Announcements = 7
    FAQs = 9
    Forums = 43
    Blogs = 55
    Web Apps = 35
    Catalogs = 26
    Bookings = 48
    You can exclude multiple areas from a search, simply list them with commas: &OT=35,1,6

  • HT2905 how to empty recycle bin in itunes

    How do you empty the recycle bin in itunes

    If you have duplicates I'd recommend you read this thread I mentioned in your other thread. It is possible to have duplicates where the same file is referenced twice in the library. If you delete and discard one copy you may find the other no longer works. This is one of the concepts that prompted the development of my DeDuper which should remove duplicates safely.
    tt2

  • How to hide Recycling bin and View All Site Content

    Is there a way to hide the "View All Site Content" and the "Recycling Bin" without modifying with S Designer.
    Thanks

    Hiding these links with CSS is a "band-aid" fix.  Users are still downloading the HTML for these controls, and users that don't use CSS will still see them in their entirety.  The best option is to remove them from your site's master page entirely.
    First, look for the following lines of code in your master page.  This code renders the "View All Site Content" link:
    <Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ViewFormPages">
    <div class="ms-quicklaunchheader"><SharePoint:SPLinkButton id="idNavLinkViewAll" runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent%>" AccessKey="<%$Resources:wss,quiklnch_allcontent_AK%>"/></div>
    </SharePoint:SPSecurityTrimmedControl>
    Now, the "Recycle Bin" link should look something like this:
    <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/recyclebin.aspx" id="idNavLinkRecycleBin" ImageUrl="/_layouts/images/recycbin.gif" Text="<%$Resources:wss,StsDefault_RecycleBin%>" PermissionsString="DeleteListItems"/>
    Now save, check in, and publish your changes.  I hope this helps!
    Kyle

  • How to exclude a task from ETL container

    Hi
    I am running Full ETL load for Oracle Financials R12.1.3 Vision instance, where one of the task is failing and due to that some 86 subsequent tasks are also failing.
    The task name is SDE_ORA_ProductDimension.
    I an suggested by Oracle Support to exclude that task from EP.
    Can someone tell me that how to exclude that from available Container, EP?
    OBIA release is 7.9.6.4 and Informatica 9.1
    You can find the details log of error here http://pastebin.com/hZRHJssi
    Thanks
    Naeem Akhtar
    Edited by: Naeem Akhtar Khan on Feb 28, 2013 8:44 PM

    Hi,
    do you make a copy of a predefined container ?
    You cannot modify objects in the predefined source system containers either through the DAC Client or directly through SQL statements to the DAC repository. You must make a copy of a predefined container in order to make any changes to it.
    You could see how to create a copy of a predefined container in the Oracle DAC documentation : http://docs.oracle.com/cd/E25178_01/fusionapps.1111/e14849/dacquickstart.htm#BABJIIBB
    Hope it helps,
    Benoit

  • How to exclude particular IPC from Rebates

    Dear SDN Team,
    Customer want to create some rebate in order to pay later on a promotional basis for the particular IPC.
    But they want to apply accruals on all IPC but by excluding particular IPC from Rebates, How to exclude the particular IPC from Rebates.
    Because customer want to exclude one IPC of the rebates calculation for only one rebates -
    Any Idea.
    For the above request i have suggested below solution - But it does not resolve their problems. But User is expecting further any other idea in order to resolve the above requirement.
    First Solution:
    In order to exclude the IPC for Ecopia from the rebates calculation- this can be done by setting the Material group in the Material Master - Basic Data1 view and you can exclude these IPC's while creating the condition records in the Rebate Agreement type.  By doing this we can exclude the rebates for the Ecopia tyres.
    Second alternative:  If you have already created the Rebate condition record for the Ecopia tyres then you can set the deletion indicator flag in the rebate condition for the particular IPC.
    Can you suggest any ideas in order to resolve this problem.
    Looking for your feedback.
    Thanks and Regards,
    Jana

    Dear,
    even if was not clear about the type of material you were reffering to, I analysed your request and I consider that you may proceed as follow.
    To achieve this result you do NOT have to modify the material master.
    Assumptions taken:
    A- you have to exclude only one material from the rebate calculation for only one rebate
    B- all other rebates do not have to be impacted by this exceptional rebate configuration
    C- material nr1 is the material to exclude
    D- material nr1 has a product hierarchy 00X (Line X)
    Procedure to achieve the objective:
    1) create a promotional rebate (RebateA) for the full Line X and set it relevant for accrual (define a percentage for accrual)
    2) create a promotional rebate (RebateB) for the single material nr1 and set it NOT relevant for accrual (no percentage for accrual)
    3) set the same percentage to pay or amount to pay to the customer in both rebates (A & B)
    4) set the same validity start-to for both rebates (A & B)
    5) define a percentage of accrual only for the first rebate (A only)
    The second rebate created (RebateB) will help in order to pay the right amount to the final customer.
    In order to perform a final settlement you will have IDEALLY simply subtract the values: RebateA - RebateB.
    There is no standard way to exclude single material from a single rebate without impacting the other active rebates.
    Of course, modify the material master is not the solution. Any change in material master will impact also open rebates and future rebates.
    For these reasons here above there is a business scenario you may apply to achieve the objective and it will not take a lot of time to maintain it.
    In case of questions or doubts to not hesitate to post your answer back to this post.
    Regards,

  • How to exclude certain playlists from being shuffled?

    I have Video IPOD and would like to know how to exclude certain play lists from being played when the "shuffle song" function is on?
    Appreciate your help.

    Going back to the beginning I think I misinterpretted your original question. I thought you wanted to be able to turn on the Shuffle Songs function of the iPod and when you played any playlist it would shuffle normally but you wanted to have some playlists that would play without shuffling without having to turn off that function.
    Now I think what you wanted to say was you want to shuffle song when playing your library on the iPod but if certain songs exist in your "do not shuffle" playlist, they would be skipped, right?
    If that is the case, you can do it with some Smart playlist manipulation. First create the "Do Not Shuffle" playlist and put everything in there that you do not want to show up when you are shuffle playing your library. Now create a new Smart Playlist where the rules are "Playlist IS NOT [do not shuffle]". Make that the only rule, check live updating and only checked songs. What will happen is that playlist will contain your entire library EXCEPT the ones you don't want shuffle played.
    Now when you listen to your iPod, you can use the Shuffle Songs option turned ON and play that smart playlist which will basically let you hear anything and everything in your library shuffled EXCEPT for those songs you designated to not include.
    Patrick

  • Siebel RecordMerge: How to exclude some entities from merging to the winner

    Hi all,
    I want to merge 2 accounts using Edit -> Merge Records.
    However, I don't want one of the related BCs (let's say contacts) to be merged to the Winner. I only want to transfer the rest like activities, opportunities etc. How do I exclude a child BC from the record merge?
    Should be fairly easy, but I can't find any related information.
    Thanks!

    I have the similar problem. I have ORA- in the Critical threshold and I just want to exclude ORA-00060 from critcial threshold. What will be the syntax for that? I do not want to filter it. I still want to recieve it as warning.
    Thanks
    Rinky
    Edited by: user11991081 on Oct 15, 2009 3:20 PM

  • How to exclude synchronous interfaces from component based message alerting

    Hi Pi experts,
    We are configuiring Alerts in PI 7.3 single stack.If we have 'n'number of interfaces, and if we configured general alerts for all.How to exclude synchronous interfaces in that.Alerting is for asynchronous interfaces only.How to do that.
    Please advice on this.
    Regards
    Suneel

    Hello,
    >>What are your approaches regarding this requirement in the context of java-only?
    I would suggest you to schedule jobs like this:
    Customize Alerts Using Job in PI 7.31/PO
    >> alerts are consumed according to the given interval and not in "real time" when error occurs, today solution using BADI is "real time" - if possible I would prefer "real time" solution
    Check this:
    Michal's PI tips: How to trigger an alert for Component Based Message Alerts (CBMA) via "API" ?
    >>an separate service determine the actual alert count would be helpful to provide the correct value for maxAlerts, this have to be called beforehand
    I haven't tried it but i think u can do that, since these consumers are nothing but JMS queues only so i think there will be a method to read number of alert counts.
    >>In history I saw emails generated by the standard alert consumer which only contain details for the first alert, in my case I need details especially the message id for all errorneous messages
    If ur max alert parameter is greater than 1 then u should see multiple alert text  (along with message id and other details) in ur email message.
    Thanks
    Amit Srivastava

  • How to disable RECYCLE BIN functionality on Oracle 10g R2

    Hi,
    I installed Oracle 10g R2 in windows 2003, then log in SQL * plus with sys as sysdba, try to use the following command to disable the RECYCLE BIN functionality which is new feature in Oracle 10g R2.
    SQL> alter system set "_RECYCLEBIN"=FALSE SCOPE=BOTH;
    I got the error: illegal option for ALTER SYSTEM
    What do I miss? any comments are appreciative.
    Grace

    SQL> alter system set recyclebin=off;
    System altered.
    SQL> alter system set recyclebin=on;
    System altered.
    SQL>Best regards
    Maxim

  • How to exclude a result from a PreQuery

    Hello,
    is it possible to exclude a result from a PreQuery in another Query? If yes please let me know.
    If not, is there another way to exclude a result from one query in another?
    Thanks,
    Benji

    Hi
    It is not possible to use pre queries in a structure (Row or column) but only in the fiter section of a query. As per a SAP error message when i tried the exact same thing.
    Hope this helps.
    Regards
    Stephen

Maybe you are looking for

  • How do I copy a time machine backup onto my old computer after I've replaced the hard drive?

    Hi everyone, I own a MacBook that I purchased in 2009, and it's served me very well since then; the only exception is that the hard drive suffered after I dropped the computer, and I had to replace it last month. The old hard drive is now useless, an

  • Partner profile agent

    Hello Someone has changed the agent name in the partner profile(LS) Can i track who made these changes? Thanks and Regards Manu

  • What happened to Pathways?  Anyone using other tagging products?

    I need to allow users to tag themselves. My first thought: this would be great for pathways! Unfortunately: "Pathways is not supported by Oracle WebCenter Interaction 10.3." (http://download-llnw.oracle.com/docs/cd/E13158_01/alui/wci/docs103/map_wci_

  • Trying to compile a C#-program using NI-Vision

    Hello, i have zip-file from a colleague which contains a C#-program that uses NI-Vision 8.5. The project used to work and i have to make changes to the code but currently i am just trying to compile the old code. System: Windows XP Installed Software

  • UK iphone user wanting to send free SMS

    I've read a few articles such as this one: http://lifehacker.com/398539/send-free-sms-messages-using-the-aim-iphone-app explaining how you can use the AIM instant messaging application on the iPhone to send SMS messages to other mobile users for free