query to find space to reduce the point.

There are storage spaces where the current use is met 90%, and we receive alerts.

I want to know how much space to add to these storage areas (data files) that use current can be reduced to 80%. or 70%

Is the any SQL query to find this information.

database to Oracle 10 g.

.


If I have the right to calculation, is perhaps what you are looking for:

select b.tablespace_name, (b.used_space/b.new_size) * 100 new_used_percent, b.used_percent,
       b.add_size_MB
  from (
        select tablespace_size + (((round(used_percent, 5) - 90)/100) * tablespace_size) new_size,
               (((round(used_percent, 5) - 90)/100) * tablespace_size) add_size_MB,
               a.*
          from dba_tablespace_usage_metrics a
       ) b;

Tags: Database

Similar Questions

  • SQl query to find out time between the different lines of transactions

    (See both images from an attachment to get the clear picture of the data and understand the question correctly.)

    I have a set of data like this in one of my paintings. (This is a simple representation of the original data.)

    Reference table1.jpg

    Id        | Type               | Value | Start_date | End_date

    ----------------------------------------------------------------------------------------------------------------------

    ZTR0098 | ALLOW | 0 | 1 JUN | 2 JUN |

    ZTR0098 | ADTAX | 0 | 1 JUN | 2 JUN |

    ZTR0098 | MXTAX | 0 | 1 JUN | 9 JUN |

    ZTR0098 | ALLOW | 4. 3 JUN | 15 JUN |

    ZTR0098 | ADTAX | 44.00 | 3 JUN | 17-JUNE |

    ZTR0098 | MXTAX | 2. 10 JUN | 17-JUNE |

    ZTR0098 | ALLOW | 5. 16-JUNE | 20 JUN |

    ZTR0098 | ADTAX | 55,34 | 18 JUN | 22 JUN |

    ZTR0098 | MXTAX | 1. 18 JUN | 25 JUN |

    ZTR0098 | MXTAX | 6. 26 JUN | 31 AUG |

    ZTR0098 | ADTAX | 20.09. 23 JUN | 23 JUL |

    ZTR0098 | ALLOW | 8. 21 JUN | 31 AUG |

    ZTR0098 | ADTAX | 45. 24 JUL | 31 AUG |

    each line has a type and a rasthaus id to it. ID belongs to other parent tables. the value of each type is given, and the validity of each value is followed by a field start_date and end_date.

    All values start from 1 - JUN and expires on 31 - AUG. Now my requirement is to obtain a report that gives three columns for three different types (ALLOW, ADTAX and MXTAX) with combination of unique values in the effective time interval. Let me put the result below.

    Reference table2.jpg

    Id         | ALLOW | ADTAX | MXTAX |  Start_date | End_date

    --------------------------------------------------------------------------------------------------------------------------------------------------

    ZTR0098 | 0 | 0 | 0 | 1 JUN | 2 JUN |

    ZTR0098 | 4. 44.00 | 0 | 3 JUN | 9 JUN |

    ZTR0098 | 4. 44.00 | 2. 10 JUN | 15 JUN |

    ZTR0098 | 5. 44.00 | 2. 16-JUNE | 17-JUNE |

    ZTR0098 | 5. 55,34 | 1. 18 JUN | 20 JUN |

    ZTR0098 | 8. 55,34 | 1. 21 JUN | 22 JUN |

    ZTR0098 | 8. 20.09. 1. 23 JUN | 25 JUN |

    ZTR0098 | 8. 20.09. 6. 26 JUN | 23 JUL |

    ZTR0098 | 8. 45. 6. 23 JUL | 31 AUG |

    As you can see there are no duplicate rows for a combination of (ALLOW, ADTAX and MXTAX) with their respective dates in force. resulting in the above table. the first step is to convert lines to the column which is pretty obvious to do that by grouping on start_date and end_date colum, but the real deal is the time interval during which the combination of the values (ALLOW, ADTAX, and MXTAX) has remained constant.

    I wrote under query using Group by.

    Select

    ID,

    NVL (max (decode (type, "ALLOW", value)), 0) as ALLOW

    NVL (max (decode (type, 'ADTAX', value)), 0) as ADTAX

    NVL (max (decode (type, 'MXTAX', value)), 0) as MXTAX

    Start_date,

    End_date

    from my_table

    Group of start_date, end_date, id

    start_date, end_date

    the results it gives are like this:

    Reference table3.jpg

    Id       | ALLOW | ADTAX | MXTAX |  Start_date | End_date

    ------------------------------------------------------------------------------------------------------------------------------------------------

    ZTR0098 | 0 | 0 | 0 | 1 JUN | 2 JUN |

    ZTR0098 | 0 | 0 | 2. 1 JUN | 9 JUN |

    ZTR0098 | 4. 0 | 0 | 3 JUN | 15 JUN |

    ZTR0098 | 0 | 44.00 | 0 | 3 JUN | 17-JUNE |

    ZTR0098 | 0 | 0 | 2. 10 JUN | 17-JUNE |

    ZTR0098 | 5. 0 | 0 | 16-JUNE | 20 JUN |

    ZTR0098 | 0 | 55,34 | 0 | 18 JUN | 22 JUN |

    .   .

    . .

    like wise

    but I'm not able to determine the time intervals by using the SQL query.

    with

    Table1 as

    (select the id 'ZTR0098', 'ALLOW' type, 0 val, to_date('1-JUN','dd-MON') start_date, end_date Union to_date('2-JUN','dd-MON') double all the)

    Select 'ZTR0098', 'ADTAX', 0, to_date('1-JUN','dd-MON'), to_date('2-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'MXTAX', 0, to_date('1-JUN','dd-MON'), to_date('9-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'ALLOW', 4, to_date('3-JUN','dd-MON'), to_date('15-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'ADTAX', 44.00, to_date('3-JUN','dd-MON'), to_date('17-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'MXTAX', 2, to_date('10-JUN','dd-MON'), to_date('17-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'ALLOW', 5, to_date('16-JUN','dd-MON'), to_date('20-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'ADTAX', 55.34, to_date('18-JUN','dd-MON'), to_date('22-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'MXTAX', 1, to_date('18-JUN','dd-MON'), to_date('25-JUN','dd-MON') of all the double union

    Select 'ZTR0098', 'MXTAX', 6, to_date('26-JUN','dd-MON'), to_date('31-AUG','dd-MON') of all the double union

    Select 'ZTR0098', 'ADTAX', 20.09, to_date('23-JUN','dd-MON'), to_date('23-JUL','dd-MON') of all the double union

    Select 'ZTR0098', 'ALLOW', 8, to_date('21-JUN','dd-MON'), to_date('31-AUG','dd-MON') of all the double union

    Select 'ZTR0098', 'ADTAX', 45, to_date('24-JUL','dd-MON'), to_date('31-AUG','dd-MON') of the double

    ),

    days like

    (select level - 1 dte + to_date('1-JUN','dd-MON')

    of the double

    connect by level<= to_date('31-aug','dd-mon')="" -="" to_date('1-jun','dd-mon')="" +="">

    )

    Select id, allow, adtax, mxtax, min (dte) start_date, max (dte) end_date

    (select ID, dte, max (allow) allow, max (adtax) adtax, max (mxtax) mxtax,

    ROW_NUMBER() over (order by dte) row_number() - courses (partition by order max (allow), max (adtax), max (mxtax) by dte) gr

    go (select id, dte,

    -case when type = 'ALLOW' and dte between start_date and end_date then end val 0 otherwise allow.

    -case when type = "ADTAX" and dte between start_date and end_date then val 0 otherwise end adtax.

    -case when type = "MXTAX" and dte between start_date and end_date then val 0 otherwise end mxtax

    Table 1 t,

    days d

    where d.dte between t.start_date and t.end_date

    )

    Group by id, dte

    )

    Group by id, gr, allow, adtax, mxtax

    order by id, gr

    ID ALLOW ADTAX MXTAX START_DATE END_DATE
    ZTR0098 0 0 0 01/06/2015 02/06/2015
    ZTR0098 4 44 0 03/06/2015 09/06/2015
    ZTR0098 4 44 2 10/06/2015 15/06/2015
    ZTR0098 5 44 2 16/06/2015 17/06/2015
    ZTR0098 5 55,34 1 18/06/2015 20/06/2015
    ZTR0098 8 55,34 1 21/06/2015 22/06/2015
    ZTR0098 8 20.09 1 23/06/2015 25/06/2015
    ZTR0098 8 20.09 6 26/06/2015 23/07/2015
    ZTR0098 8 45 6 24/07/2015 31/08/2015

    Concerning

    Etbin

  • Move the point of alignment of the symbol in CS4, how?

    Boy I feel stooopid.  I can't find how to move the point of alignment of the symbol in Flash CS4.  It's easy reeely in CS3.  A clip I made was of course a registraion point at the Center, and I'm using AS 3.0 to place the instance on the stage, which means of course that I see now the lower right of the movie...  I don't want it to use as place the clip at a different time, I just want to know how to move points of alignment of all symbols in CS4.  When I go to edit a symbol I see reticle existing symbols which I assume are the existing alignment point, but how can I move?

    Confusedly yours.

    Dave N

    I don't have CS4, so I don't know if there is a change in how it is done. Also, I'm not otherwise in CS3 to open the symbol and move items around, not the point of alignment, either manually, or via the alignment tool.  Then you may know sdomething I did not... but that's how I do it where it's not how you do it.

  • How can AF:query, I reduce the distance bettwen categories of UI and inputbox?

    Hello:

    I use JDeveloper 12.2.1.

    I created AF:Query engine of research, using a ViewObject with UI classes.

    AF:query shows the categories and the intputbox below them. (See the image)

    afquery.png

    How can I reduce the distance bettwen them?

    I tried to change the properties of the AF:Query with the skin Editor, but I can't find the way.

    Thanks in advance,

    Jery

    Thanks for your help, Timo.

    With this information, I reduced the space, using the following steps:

    1. place a styleClass on af:query

    2. set DISABLE_CONTENT_COMPRESSION on web.xml file

    3. search HTML element to hide with FireBug (Firefox)

    4. create a CSS to hide the element HTML (image in this case)

    The space is then less:

    Jery

  • How to reduce the amount of storage to free up more space

    How to reduce the amount of storage to free up more space

    There are several things you could do.

    Save your iPad to iTunes on a computer or create an iCloud account, find out how much storage space you need for data and if you need to buy storage space monthly, to do. Then save your iPad to iCloud.

    HOWEVER the data backup on your iPad using WiFi or Bluetooth wireless, local devices such as portable hard drives or small flash memory drives designed for use with mobile devices, like the iPad.

    Remove the applications that you use is no longer. If you start to use them in the future, you can re-download them the iOS App Store.

    Thin out / remove the amount of music and movies you have on your iPad.

    If you make a backup of your iPad, you can thin out / delete all images stored in the iOS App Photos.

    Thin out / remove all books electronic, iBooks, eMagazines, and PDF documents, you have stored on your iPad. Magazines and e-books can be redownloaded at a later date.

  • After you create a system restore point manually, I can't find the point.

    Original title : What's next?

    After you create a system restore point manually, I can't find the point.  Where is he?

    Hello

    More than you probably ever wanted to know.

    How to create a Vista System Restore Point
    http://www.Vistax64.com/tutorials/76332-system-restore-point-create.html

    How to make a Vista system restore
    http://www.Vistax64.com/tutorials/76905-System-Restore-how.html
    How to turn System Restore on or off in Vista
    http://www.Vistax64.com/tutorials/66971-system-restore.html

    Adjustment of the amount of disk space, System Restore uses for restore points
    http://bertk.MVPs.org/html/diskspacev.html

    How to change how much Space System Restore can use
    http://www.Vistax64.com/tutorials/76227-system-restore-disk-space.html
    http://www.Petri.co.il/change_amount_of_disk_space_used_by_system_restore_in_vista.htm

    ShadowStorage vssadmin commands
    http://TechNet.Microsoft.com/en-us/library/cc755866 (WS.10) .aspx
    http://technet2.Microsoft.com/WindowsServer/en/library/89d2e411-6977-4808-9AD5-476c9eaecaa51033.mspx?mfr=true

    Guide to Windows Vista system restore
    http://www.bleepingcomputer.com/tutorials/tutorial143.html

    Expiration errors occur in Volume Shadow Copy service writers, and shadow copies are lost during
    backup and at the time when there are high levels of input/output
    http://support.Microsoft.com/?ID=826936

    A good utility:

    Explorer of the shadow - free
    http://www.ShadowExplorer.com/

    You can also view the bridges restore in CCleaner - tools - system restore.

    CCleaner - free - on the left side click on download from Piriform
    http://www.Piriform.com/ccleaner/download

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Reduce the Display of toolbars to give more space to display the content

    I try to combine toolbars to reduce the space they take so I can have more viewing space. I have

    Level 1: Address box of Internet Explorer and Google bar

    Level two: Norton Tool bar and order (home and print icons) cannot extinguish nortan because then it disables the protection and I can't move either anoron or the command bar to join one of the other levels computer won't let me hang out.

    Evel 3:Favorites and command bar n which are at both ends. I reduced the favorites by doing a file indicating all the Favorites, it's the only thing that shows, leaving plenty of space between the Favorites and the comand bar.

    I can't move anything on any level by dragging and try found another way to do it if I have searched for info anywhere I think colud.

    Am I stuck with these screens showing all this useless space?

    WOW I just found "full screen" under the view and makes some of these levels to disappear or reduce somehow, but then they are missing when I try to return and I have featured on trying anything to find... Please think about it and let me know what to do. Mary Kay H. very frustrated!

    Hello

    They have different functions, so you cannot combine one of them. However, you can disable the Norton taskbar, so this does not disable its protection. It's the same thing with the Google bar or any other.

    Good luck, Rick Rogers, aka "Crazy" - Microsoft MVP http://mvp.support.microsoft.com Windows help - www.rickrogers.org

  • Did not push the file control point (no space available on the device)

    Hello

    I use Proliat HP DL 380 G5.  8 GB (RAM) 61 GB of space

    (RAID0 + 1) second HARD drive has failed while working on a HARD drive at the moment...

    After 20-25 minutes, I can't ping my VM OS which is Windows 7 (active)... and events, I see this error...
    Did not push the file checkpoint at 05:00 (no space available on the device).

    Details of the event:
    Type: error
    Description: Error message on WINDOWS-PRTG on localhost.localdomain ha-Datacenter: impossible to reach 5.3 GB of file control point: no space is available on the device.
    Time: 09/12/2015-10:05:31
    Error stack:
    Did not push the file checkpoint at 05:00 (no space available on the device).
    Failed to prepare the file ' / vmfs/volumes/56653def-ccd90fc3-0a42-001b783701ae/WINDOWS-PRTG/./WINDOWS-PRTG-f1e094f5.vmem ': 28 (no space available on the device).
    An error occurred during registration: 28 (no space available on the device).
    Impossible to suspend the virtual machine: msg.suspend.error.SUSPEND_E_NOSPACE.
    Additional event details:
    Type ID: error
    Build host: 3029758
    Target object Type: ComputeResource
    Type of data center: data center
    The host object type: HostSystem
    VirtualMachine object type: VirtualMachine
    ChainId: 201

    Could you help me solve this problem?

    Thanks in advance

    * Note * I found the solution... Before I used the system of virtualization and Citrix (XENSERVER) there was little different. That's why I'm stuck on a few easy steps... Well, the problem was that I use 61GB HDD, 5.5 GB of memory. When I create the VM I "ve used the maximum size of HARD drive and left no space for the SWAP file. I used 58 GB, and you have to assume + memory size, this means, 58 GB + 5.5 GB...   So who is right for which I didn't have enough space. Hopefully someone will find it useful. See you soon,.

  • How to reduce the space between text and Image

    I am trying to wrap text around an irregular shape in InDesign CS4. I used the pen tool to mark the outlines of the image, crop the image, then selected the outline of the pen and pasted the image into the outline. With parameters defined for the TextWrap is in this dialog box, text wrapping seems in good shape on the right side, but he has too much space on the left side.

    textwrap0.png

    If I try to reduce the space even further away, it is only on the right side of the image, not the left:

    textwrap1.png

    It's the same thing for all my irregular images where I try to wrap the text. How can I reduce the white space to the left of the picture?

    You can use direct selection and the pen tool to change the skin path in repositioning of anchor points and guidelines and adding more anchorpoints etc. In this way, you can move the path of the scarf to the inside a little more to allow the best fit of the text.  To lock breaks in a bit more on a line-by-line, take into account settings composer to composer Adobe single-line (Control Panel menu)

    You can also try to allow hyphenation. With the text aligned to the box on the left will always left a little look gappy I think. However allowing hyphenation will get InDesign to cut the breakpoint to the left of the object with the text, as well as at the end of the line wrapping.

    Also if you change the alignment for Justified, you will also get a better result.

    On a related side note, I had usually advice my trainees do not to wrap the text on the left and right sides, when the object with the scarf is placed in the middle of a sentence. It makes reading more difficult phrases.

    Hope this helps,

    CARI

    --

    Twitter.com/carijansen

  • Reduce the space used on a large table

    11 GR 2, I have a table that uses up to 50 GB (almost 600 million lines) and increases by about 1 GB (8 million lines) per week. He arrived at a point where we can just continue to add disk space to solve the problem.

    There are two things we can do to reduce the amount of space: delete unnecessary lines and drop some deprecated columns.

    I'm not sure is:

    (a) is it too 'easy' that make the cuts/drops then ALTER TABLE TableName SHRINK the SPACE WATERFALL, or must he something else to do to actually free up space?

    (b) assuming that it's that easy, how overheads is needed - how much space (temporary) disk is necessary to achieve this?

    Narrowing of the space is going to be potentially very expensive. Essentially, Oracle will remove lines at the end of the table and insert them into the free space you created by removing the other lines. So you will potentially generate a ton of roll forward. Of course, you must activate the movement of the row in the first table. And the table must be in a tablespace SAMS.

    It requires no additional disk space, and it does not lock the table with the exception of a short period of time at the end of the operation.

    More details on the process of narrowing of the segments online.

    Justin

  • How to reduce the size of the tablespace (space reover) if the schema is remov

    Hello

    I have a large tablespace user for diagrams 3 and 4. I needed emergency of space on the hard drive so I had to remove one of the schema (fall of the user). Now this tablespace is shown as filled to 70%. I want to reduce the space allocated to it. I use the console manager oracle. Try to reduce the allocated size for the tablespace but it does not.
    It has undotbs available free size is very good, but who also is not reduced.

    Is it possible so that I can assign less space for these tablespace so that I can recover from the physical space.

    Thanks for the reply.

    Hello

    You can only free space at the end of the data file if it's free. It is likely that this space has been allocated by a rollback segment.
    If this is the case, then your alternative is to create a new UNDO tablespace and the point of the database to use.

    Create a new UNDO tablespace.
    CREATE UNDO TABLESPACE undo_ts2
    DATAFILE ' / directory/undo_ts2_01.dbf ' SIZE xxxM;
    Change the database to use the new UNDO tablespace.
    ALTER SYSTEM SET undo_tablespace = undo_ts2 SCOPE = BOTH;

    New transactions will begin using the new undo tablespace. After a certain time passes (at least the number of seconds specified by the UNDO_RETENTION initialization parameter), you can drop the old UNDO tablespace. The disadvantage of this approach is that for a short period of time, your database will be two UNDO tablespace

    Kind regards
    Deepak

  • How to find the point of intersection of the two geometry?

    Hello
    Could someone give some suggestions on how to find the point of intersection of the two geometry?
    I need just point. (x, y, z)
    Thank you

    Can you post the full result of geometry returned?

    What you should have as a result:

    MDSYS. SDO_GEOMETRY (2001, 1, NULL, MDSYS.) SDO_ELEM_INFO_ARRAY (1,1,1), MDSYS. SDO_ORDINATE_ARRAY (2.0,2.0))

    Notice the sdo_intersection will use only the sdo_ordinate_array, even if the result is a point! (with the SDO_POINT is NULL.)

    where do you find these x, y, z values of?

    On your other question:

    -using the operator space sdo_relate (with mask = ANYINTERACT) will return in pairs, the result of the intersection of each anyinteracting polygon, line combination.

    -of course, these results will vary from point, multipoint, line or multiline even depending on how the interaction takes place.

    -try to explain a bit more what do you mean 'I want only points to return' of nit.

    Luke

  • Just updated to Sierra and updated Pages at the same time. Now when I try to select a line of text I find myself with an insertion point where I stopped by selecting

    Today, I updated for Sierra and updated to the latest version of the Pages. Now I find that I am more able to select a line of text. When I try to do, I find myself with an insertion point where I stopped by selecting, but nothing is selected. This is a bug in the new version of pages or get my wrong settings?

    You use a Wacom tablet by chance?

    Solution: Press the shift key, just before stop selection. And Yes, that sounds like trouble in the Sierra.

  • When I open a new finder window there's 3-point mark at the beginning of the page

    When open a new finder window there are three points of mark at the top of the window.  The window seems to work ok but think it must be a kind of first cause and would like some guidance on how the issue barely draw.

    Thank you

    Daniel

    Here is the alias is more recognized.

    You can drag these out of the Finder window using the key command

  • New AOL e-mail: one quarter of the screen is blank on the right side, reducing the space for the e-mail subject line. Resize attempts do not work on the right side, so I can't expand the e-mail subject line

    The new AOL E-mail look, which yesterday began a quarter of the screen is blank on the right side, thus reducing the space for the e-mail subject line, which limits its usefulness. Resize attempts do not work on the right side, so I can't expand the e-mail subject line? Running XP pro and Mozilla Firefox 5. No problem with I.E.

    Thank you, these settings were already in place. AOL said now erase the cache, cookies and history... to solve, which worked. (I deleted the cache and a story time.)

Maybe you are looking for