Need script formating

I have this script to find all tablespace usage details. I want to format the values like 2 digits after decimal and other number formats. Can anyone plss modify it, so that it appears in standard number format
select substr(A.tablespace_name,1,16) "Tablespace",
MAX(A.contents) "Type",
MAX(A.status) "Status",
MAX(A.initial_extent)/1024 "Initial extent(Kb)",
MAX(A.next_extent)/1024 "Next extent(Kb)",
MAX(A.max_extents) "Max extents",
MAX(A.pct_increase) "Pct_increase",
(SUM(B.BYTES)*COUNT(DISTINCT B.FILE_ID)/COUNT(B.FILE_ID)/1024/1024)-(ROUND(SUM(C.BYTES)/1024/1024/COUNT(DISTINCT B.FILE_ID))) "USED SIZE(Mb)",
(SUM(B.BLOCKS)*COUNT(DISTINCT B.FILE_ID)/COUNT(B.FILE_ID))-(SUM(C.BLOCKS)/COUNT(DISTINCT B.FILE_ID)) "USED BLOCKS",
TO_CHAR(100-(SUM(C.BLOCKS)*100*COUNT(B.FILE_ID)/(SUM(B.BLOCKS)*COUNT(DISTINCT B.FILE_ID)))/COUNT(DISTINCT B.FILE_ID),'999.99')||'%' "USED USAGE",
ROUND(SUM(C.BYTES)/1024/1024/COUNT(DISTINCT B.FILE_ID)) "FREE SIZE(MB)",
SUM(C.BLOCKS)/COUNT(DISTINCT B.FILE_ID) "FREE BLOCKS",
TO_CHAR((SUM(C.BLOCKS)*100*COUNT(B.FILE_ID)/(SUM(B.BLOCKS)*COUNT(DISTINCT B.FILE_ID)))/COUNT(DISTINCT B.FILE_ID),'999.99')||'%' "FREE USAGE",
SUM(B.BYTES)*COUNT(DISTINCT B.FILE_ID)/COUNT(B.FILE_ID)/1024/1024 "TOTAL SIZE(Mb)",
SUM(B.BLOCKS)*COUNT(DISTINCT B.FILE_ID)/COUNT(B.FILE_ID) "TOTAL BLOCKS"
from dba_tablespaces A,
DBA_DATA_FILES B,
DBA_FREE_SPACE C
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME
AND A.TABLESPACE_NAME=C.TABLESPACE_NAME
GROUP BY A.TABLESPACE_NAME
order by 1;

It looks OK to me.
SELECT Substr(a.tablespace_name, 1, 16)                                                                                                                  "Tablespace",
       MAX(a.contents)                                                                                                                                   "Type",
       MAX(a.status)                                                                                                                                     "Status",
       MAX(a.initial_extent) / 1024                                                                                                                      "Initial extent(Kb)",
       MAX(a.next_extent) / 1024                                                                                                                         "Next extent(Kb)",
       MAX(a.max_extents)                                                                                                                                "Max extents",
       MAX(a.pct_increase)                                                                                                                               "Pct_increase",
       ( SUM(b.bytes) * COUNT(DISTINCT b.file_id) / COUNT(b.file_id) / 1024 / 1024 ) - ( Round(SUM(c.bytes) / 1024 / 1024 / COUNT(DISTINCT b.file_id)) ) "USED SIZE(Mb)",
       ( SUM(b.blocks) * COUNT(DISTINCT b.file_id) / COUNT(b.file_id) ) - ( SUM(c.blocks) / COUNT(DISTINCT b.file_id) )                                  "USED BLOCKS",
       To_char(100 - ( SUM(c.blocks) * 100 * COUNT(b.file_id) / ( SUM(b.blocks) * COUNT(DISTINCT b.file_id) ) ) / COUNT(DISTINCT b.file_id), '999.99')
       ||'%'                                                                                                                                             "USED USAGE",
       Round(SUM(c.bytes) / 1024 / 1024 / COUNT(DISTINCT b.file_id))                                                                                     "FREE SIZE(MB)",
       SUM(c.blocks) / COUNT(DISTINCT b.file_id)                                                                                                         "FREE BLOCKS",
       To_char(( SUM(c.blocks) * 100 * COUNT(b.file_id) / ( SUM(b.blocks) * COUNT(DISTINCT b.file_id) ) ) / COUNT(DISTINCT b.file_id), '999.99')
       ||'%'                                                                                                                                             "FREE USAGE",
       SUM(b.bytes) * COUNT(DISTINCT b.file_id) / COUNT(b.file_id) / 1024 / 1024                                                                         "TOTAL SIZE(Mb)",
       SUM(b.blocks) * COUNT(DISTINCT b.file_id) / COUNT(b.file_id)                                                                                      "TOTAL BLOCKS"
FROM   dba_tablespaces a,
       dba_data_files b,
       dba_free_space c
WHERE  a.tablespace_name = b.tablespace_name
       AND a.tablespace_name = c.tablespace_name
GROUP  BY a.tablespace_name
ORDER  BY 1

Similar Messages

  • Script format question: Title over

    Question: In the script format when using a "TITLE OVER" is it a General, Shot or an Action format. Appreciate any input here, thanks.
    Rich

    It a good question, as it is worth thinking how the elements in our screenplays will be used down the line. So for example, although the formatting of making it a Shot certainly would put TITLE OVER in caps, and making it Action would allow the paragraph it is in to be lower and upper case, it better to think how the elements may be used as metadata when you move on from writing, rather than how they look on the page. The tags and elements will be used by others in many different ways as the script moves through the planning and shooting steps.
    Shot elements will be processed by an application like Adobe OnLocation which will create a placeholder shot for it for the shoot. That could be theoretically correct in this case as the title will need to be shot. However to answer your question I think General is the appropriate element, just as the Title and Author are General on the titlle page.
    Are there other elements of the screenplay that will need to be tagged in special ways so they are available as the right kind of metadata later in the production process?

  • Can i use seagate goflex 3tb external hard drive for 2010 27" imac internal hard drive replacment if i take it out of the goflex case.do i need to format it before installation due to it allready having goflex software on it from manufacturer.

    i have 3tb seagate goflex external hard drive.its brand new in package.i took it out of case and deleted partitions that were created by manufacturer.so now i have 2800 gigs.its formatted ntfs.will it work for late 2010 27" imac internal hard drive replacement.i found a apple repair place that will charge me 50$ to swap drives for me assuming i have the drive.i will have to install leopard myself at this price.i dont want to have to pay for anything other than the swap.will this hard drive work with this format or do i need to format it differently.

    Hello
    formatted ntfs
    NTFS format not work on mac system , need to be formatted as Extended Mac os Journaled format and partition table need to be GUID
    how to do that in video
    HTH
    Pierre

  • Do I need to format my iPod on Windows to use it as a hard drive on a PC?

    I use my iPod on a MacBook with my iTunes library, but now want to ALSO use it as a simple hard drive on my PC for files transfer.
    In the Windows explorer, I am told that it is not formatted and I am proposed to format it, which would erase all data on it.
    Do I need to format my iPod on Windows to use it as a hard drive on a PC?
    (I don not have iTunes installed on that PC currently)
    And if I have to format it, will all my music be gone, but can I simply then synch it again on my MacBook with my iTunes library?
    Thanks a lot in advance.

    To use the iPod Classic on both the Mac and Windows PC, you need to format it in FAT32 filesystem structure, which both OS can recognise.
    Yes, formatting it in FAT32, using iTunes, will erase all music and data in your iPod, but that is no problem if you have all the music in your Mac iTunes library.
    So to do this,
    Install the Latest iTunes in your windows PC, run itunes and check that all is in order (you can navigate, play some sample songs in itunes.)
    Connect your iPod to the Windows PC, USB 2.0 port (please dont use USB hub with iPod Classic, -my bad personal experience, freezing itunes and windows)
    iTunes will pop a windows asking you to reformat it in FAT32 and Restore
    Click ok. (HERE there maybe some problem, if your iPod hardisk is not in tiptop condition)
    When Restore is complete, eject the iPod
    Connect it to your Mac and sync iTunes library.
    If you want to use the iPod in Windows as an external hd, you have to set it in Disk Mode.  first then Windows will recognise it as a portable HD.
    Good luck! on this big undertaking.

  • When connect ipod nano 6th gen i get error message "you need to format the disk in drive G: before you can use it Do you want to format it?"

    when connect ipod nano 6th gen i get error message "you need to format the disk in drive G: before you can use it Do you want to format it?" Any suggestions please

    Hi Michael
    These are the answers
     to your questions
    What is the OS version, Windows Server 2008?   
    Microsoft Windows [Version 6.0.6001]  
    SP1
     On which disk you choose to install it, the C: drive? 
    I have Raid 5
    What
    is the output of the Checkdsk?   It find Nothing
    Could
    you please upload us a screen shot?  I have no 
    Screen shot
    Is
    the C: drive is a external drive?  NO
    Besides,
    have you manually assigned the drive letter? 
    NO
    Thanks

  • IPod is formatted for windows but i need it formatted for mac

    i just got my iPod a couple days ago used from best buy and hooked it up from my mac not aware that it was formatted for windows. when i try to restore my iPod it just freezes up my computer. do i really need it formatted for mac in order to get good performance?

    Right. If you restored it in Windows the iPod will still be formatted for Windows.
    Now see if you can restore it on your mac.
    Also, know that Windows-formatted iPods work fine in Mac OS X. The only "problem" is that you cannot update the iPod's software on your mac if another software version is released. You would have to do that through Windows.
    If you plan on using your iPod with both Operating Systems, you may want to keep it formatted for Windows.
    btabz

  • Have a mac book pro that crashed. ran disk utility to repair. comp booted and ran for short time. then crashed. ran repair again. disk utility said it could not repair files and i needed to format hard drive and start again. now nothing works

    have a mac book pro that crashed. ran disk utility to repair. comp booted and ran for short time. then crashed. ran repair again. disk utility said it could not repair disk and needed to format and start again.
    comp said it could not unmount disk and now when comp trys to boot all i get is a question mark on the screen. help

    Erase and Install
    1. Boot from your Snow Leopard Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Quit DU after formatting completes and return to the installer. Install Snow Leopard.
    5. After restart into Snow Leopard download and install Mac OS X 10.6.8 Update Combo v1.1.

  • Re: Need to format an internal hard drive into FAT32, how?

    OK, this is no playstation forum but bear with me.
    I bought a new 1 TB samsung internal HDD for my playstation 3 but it will not recognize it, probably because it is not pre-formatted into FAT32. I need to format this drive. I tried to put into an old laptop and do it but the connections were different. I put it into my Satellite A500-12W and thought I would use an old windows XP cd and find a "format" option instead of installation. However, the computer would not boot from the CD with the new hard drive in. I got the error message:
    "PXE-E61: media test failure, check cable
    PXE-MOF: exiting Pxe rom"
    The drive is brand new and should not be faulty. I had created Sattelite recovery discs before so I put number 1 in and then I reached the installation process but it seemed I had no option but to install the entire thing which is 4 DVDs and when I did it before I recall it being a days work (formatting often is with all the OK's that needs to be pressed) and I am working a lot these days, I would like to avoid making a full install just to be able to felete everything again and format it into FAT32. Since we are talking about the internal drive I can't just do it from windows since there is no windows on it....
    The user manual has nothing useful to contribute, I have looked through setup looking for a "format" option but can't find one.
    Can anybody help me? Can I for example enter MS-DOS without an operating system istalled and do it from there? All I want is an empty FAT32 HDD....

    Hi
    I assume you have formatted the HDD in FAT32 but you didnt create an partition.
    You have to create an partition on the HDD and then you can format this in FAT32
    Then the full 1TB should be accessible.
    You can do this using tool like fat32format
    Copy this fat32format on diskette or HDD. Its not big 24kb
    Now you have to point to the fat32format.exe and have to start this application using command fat32format.exe
    Then use command fat32format X: (X means the HDD drive in most cases its C)
    Now you have to press Y for Yes
    Other method:
    Boot the notebook using an Linux Live CD like Knoppix
    Such linux does not need to be installed on HDD.
    Now Linux should be able to access the HDD and you could create an FAT32 partition on this HDD

  • I have just bought a macbook pro and i want to use an ext hard drive with it which i previously used on a windows computer, but when i plug it in it doesn't show up on my macbook pro, I've wiped it and just need to format it but don't know how, help

    i have just bought a macbook pro and i want to use an ext hard drive with it which i previously used on a windows computer, but when i plug it in it doesn't show up on my macbook pro, I've wiped it and just need to format it but don't know how, any help would be much appreciated

    Try the other USB port. If it still doesn't show up in Disk Utility then there may be something wrong with your Mac. Try something else in each USB port and see if it is seen. If the other thing, like a USB thumb drive, does show up in disk utiltiy then the USB ports are fine.
    Power down the system and restart with the drive connected, go to DU and see it it is seen.

  • New Buffalo extreme external hard drive do I need to format before use

    Hello
    Just purchased a Buffalo extreme external hard drive which can be used for mac or windows.  What I would like to know, do I need to format it journaled before using this hard drive for backing up only?  Should I partition this hard?
    Thank you
    rachealfromva

    Hi Illaass
    Many thanks for your response, what would we do without lads and ladies like you, thank you again
    rachealfromva

  • Hello All. I am working on a form, but I need to format the leading in a multi-line text-field.

    Hello All. I am working on a form, but I need to format the leading in a multi-line text-field. The options for the text-field only show a font size option, but no other styling options. Is there a way to format the leading? Thanks!

    Not within ID, and I'm not sure it can be done in Acrobat afterward either.

  • With in smart forms   i need time format like 12:26:37

    hi,
    in smart forms time format is coming to one variable time in this format 122637, but i need this format  12:26:37
    plz tell me the answer.
    thanks.

    Hi
    Check this:
    REPORT  ztest_time_conv.
    DATA: hour(2) TYPE n,
          min(2) TYPE n,
          sec(2) TYPE n,
          tim TYPE i.
    DATA: time TYPE p DECIMALS 2.
    DATA: timeformat TYPE sy-uzeit.
    time = '1.38'.
    tim = time * 3600.
    hour = tim DIV 3600.
    tim = tim MOD 3600.
    min = tim DIV 60.
    sec = tim MOD 60.
    CONCATENATE hour min sec INTO timeformat.
    WRITE timeformat.
    BREAK-POINT.
    PS:Code given by Vijay Babu Dudla in other thread..in ABAP general..when I pasted the link,it did not work..so I am giving it here like this.
    Regards,
    VIshwa.
    Edited by: Vishwa Sri Hari on Nov 5, 2008 1:01 PM

  • HT3775 i need codec format to support audio to play movies?

    i need codec format to support audio to play movies

    Just download the free, open-source media player VLC. It plays pretty much anything.Get VLC here:
    http://www.videolan.org/vlc/download-macosx.html
    Also, beware of dodgy internet sites that say you can't play a movie and offer to install a 'codec' for you. They're typically malware or spyware.

  • Cdrom not working and need to format ibook

    hi there had a search but couldnt find anything directly.
    my g3 ibook, 900mhz power PC G3 laptop has a faulty cd rom and no longer works, and i need to format the ibook to delete any personal and data so i need to format it ready to sell.
    i have and osx 10.4 cd,
    how do i go about formatting my laptop without the cd rom drive. usb hard drive? if so how etc or any other ways, really want to delete an clear it before selling it on.
    thanks

    Hi, and welcome to Apple Discussions.
    OS X 10.4 initially came as a DVD, just to make sure you know that.
    Do you have access to another Mac with FireWire? If so, you may be able to do it via F.J.'s instructions here:
    http://www.oreillynet.com/mac/blog/2005/05/thecats_mustachesinstalling.html

  • I have 1TB hard drive i cant drag or sent to it although i can view it on my desk top do i need to format the hard drive ? please advise

    i have 1TB hard drive i cant drag or sent to it although i can view it on my desk top do i need to format the hard drive ? please advise

    If the format is NTFS, which it likely is, then follow Ralph's advice, but youmay also want to partition it with GUID partition table.
    In Disk Utility, select the drive, then Partiiton tab.
    Choose 1-partition from the popup menu.
    Click the Options button (it is only enabled if you change the partition layout, above).
    Select GUID partition table.
    Then, give the drive a Name and format of Mac OS Extended (Journaled).
    If you wish to use the drive with Windows, use MSDOS or exFAT. MSDOS will limit files sizes to 2GB. Some think exFAT is flakey.

Maybe you are looking for

  • Error in Opening Document - error messgae as "First Define Numbering Series

    Dear All With new financial year starting one of our customer define new posting periods (12 periods for each month) and assigned one period indicator for all the periods. They also defined some user groups and assigned this groups to document number

  • How can I get rid of the display of the last played music-title

    How can I get rid of the display of the last played music-title When playing a music-title the name of the title and it's progress is displayed in the box at the top of iTunes, even if the music is already stopped or ended. This display is impeding f

  • Fixed price for Cost Center

    Hi Friends,    In KP26 ( Activity Type / Price planning ),i want to get the fixed price for the  particular Cost Center.it is storing in which table ? please help me to solve this problem. Regards, Anburaja.K

  • Failover cluster storage pool cannot be added

    Hi. Environment: Windows Server 2012 R2 with Update. Storage: Dell MD3600F I created an LUN with 5GB space and map it to both node of this cluster. It can be seen on both side on Disk Management. I installed it as GPT based disk without any partition

  • PHP error reporting level

    Hi all, Thanks to the people who helped me in my last post, I just got PHP version 5 installed for the OS X web server. However, no errors or warnings are reported now, and they were before. I checked /etc/php.ini, and saw these lines: error_reportin