Check disk space thru database

Friends,
Is there a way to run the command say "df -g" through the database and get the output so that to display
it finally in the database?

You can use
1>host df -h
2>host df -m
If you need total database size then use this querry.
select DataFiles.data_size+TempFiles.temp_size+RedoLogs.redo_size+ControlFile.controlfile_size "total_size in MB"
from
( select sum(bytes)/1024/1024 data_size from dba_data_files ) DataFiles,
( select nvl(sum(bytes),0)/1024/1024 temp_size from dba_temp_files ) TempFiles,
( select sum(bytes)/1024/1024 redo_size from sys.v_$log ) RedoLogs,
( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024 controlfile_size from v$controlfile) ControlFile;
If you have asm diskgroup, then
select name,total_mb/1024 TOTAL_GB ,free_mb/1024 FREE_GB, ((free_mb/total_mb)*100) " %FREE ", 100-((free_mb/total_mb)*100) "%USED" from v$asm_diskgroup;
Regards,
Venki

Similar Messages

  • OraRRP Error with "Unable to copy data file;Error code 2, check disk space"

    Hi,
    Some users get this message -"Unable to copy data file;Error code 2, check disk space" when run report with orarrp, but most users do not get it.
    I check free space at both server and client side, they are very sufficient.
    I also checked directory exists for REPORTXX_TMP variable.
    My user call reports via URL (rwservlet) and it occur for all reports.
    How I can solve this problem?
    Thanks in advance.
    Tawatchai R.

    Hi,
    have the same problem now. One user has temporarily problems to download .rrpa files via URL (rwservlet) request. Error code: -"Unable to copy data file;Error code 2, check disk space". Did you get a solution??
    Thanks in advance. Axel

  • Check disk space

    Hi,
         I have to check disk space on remote servers..and alert us (send email) if free space goes below threshold value..Any ideas Please how to implement this using power shell...any help would be appreciated.
    Thanks

    ALL,
        I was able to run this script with no problem
    $percentWarning = 10;
    # Get server list
    $servers = Get-Content "$Env:USERPROFILE\serverlist.txt";
    $datetime = Get-Date -Format "yyyyMMddHHmmss";
    # Add headers to log file
    Add-Content "$Env:USERPROFILE\server disks $datetime.txt" "server,deviceID,size,freespace,percentFree";
    foreach($server in $servers)
                    # Get fixed drive info
                    $disks = Get-WmiObject -ComputerName $server -Class Win32_LogicalDisk -Filter "DriveType = 3";
                    foreach($disk in $disks)
                                    $deviceID = $disk.DeviceID;
                                    [float]$size = $disk.Size;
                                    [float]$freespace = $disk.FreeSpace;
                                    $percentFree = [Math]::Round(($freespace / $size)
    * 100, 2);
                                    $sizeGB = [Math]::Round($size / 1073741824, 2);
                                    $freeSpaceGB = [Math]::Round($freespace / 1073741824,
    2);
                                    $colour = "Green";
                                    if($percentFree -lt $percentWarning)
    $colour = "Red";
                                    Write-Host -ForegroundColor $colour "$server $deviceID
    percentage free space = $percentFree";
                                    Add-Content "$Env:USERPROFILE\server disks $datetime.txt"
    "$server,$deviceID,$sizeGB,$freeSpaceGB,$percentFree";
    Can you guys help me how to configure alerts here...like to sent email if $percentWarning goes below 10..
    Thanks

  • Checking disk spaces on hdd of oracle database

    Hi ,
    I am using Oracle 9i is there any pre-written procedures/functions that can be used for checking the hdd space ?
    I believe in Oracle EM , it's able to set a job to detect low hdd space ?
    appreciate ur advise
    tks & rdgs

    What harddisk space?
    Oracle does not need to keep track of actual harddisk space available - it after all uses the space inside the data files assigned to its tablespaces. It does not care about how much space is left on the harddisk.
    You can make an operating system call to determine the amount of free space on a file system (harddisk) - but you have no idea what your/Oracle's space allocation is on that file system. Other Oracle tablespaces can have data files on the same file system. Archive logs and redo logs could also perhaps exist on that file system. Free space that may no longer exist in 30 seconds time.
    So even if you make this "what is the percentage free space" call, the result itself is totally meaningless as you cannot determine how much of that file system (harddisk) space is usable for your Oracle data file or tablespace.
    Also, such an Oracle data file can be a raw device - in which case the operating system itself is clueless as to how much space has been used and not used on that raw device. So you cannot even make an o/s call to determine used vs free space utilisation.
    The correct method is to look inside Oracle only. The data files allocated to Oracle is the actual space that has been allocated for Oracle. Period.
    You can only deal space wise with the amount of space assigned via these data files to Oracle. You can determine how much space is left. Some of these files may be auto extending - but you have no idea whether or not that auto increase of the file size can be serviced and fulfilled by the operating system.
    Thus checking harddisk space from inside Oracle for any type of Oracle db space management is pretty much a useless exercise IMO.

  • Re : Lion freeing up Hard Disk Space automatically

    Hey,
    I know this will sound strange but ive been noticing my Har Disk space automatically going up. It was 80 GB yesterday, this morning it was 120 GB and now its 152 GB !! I havent deleted anything and i have no idea what files are being deleted ! is anyone else facing this ? Should i be worried ? Or should I just enjoy the new found leg room !!
    Thanks,
    Maahir

    So would time machine cause the finder to show me additional memory ? Also strangely when I check the space thru system information, it shows me around 60 go which is more or less what it should be. But the status bar at the bottom of finder windows and the info for the macintosh HD both show the extra 90 gb

  • Step 6 error insufficient disk space in oracle linux

    hi am in step 6 installing my oracle oracle in oracle Linux am getting insufficient disk space on this volume for the selected oracle
    i have this dir oracle_base = /u01/app/oracle/product
    sofware location /u01/app/oracle/product/11.2.0/db_1
    database file location /u01/app/oracle/product/oradata
    how can i check space becuase is have enough space
    Edited by: Tshifhiwa on 2012/01/27 2:40 PM
    i type free -m
    total used free shared buffers cached
    Mem: 1988 1844 143 0 36 1365
    -/+ buffers/cache: 443 1545
    Swap: 3999 0 3999
    Edited by: Tshifhiwa on 2012/01/27 2:40 PM
    Edited by: Tshifhiwa on 2012/01/27 3:44 PM
    Edited by: Tshifhiwa on 2012/01/27 4:05 PM

    Tshifhiwa wrote:
    hi am in step 6 installing my oracle oracle in oracle Linux am getting insufficient disk space on this volume for the selected oracle
    i have this dir oracle_base = /u01/app/oracle/product
    sofware location /u01/app/oracle/product/11.2.0/db_1
    database file location /u01/app/oracle/product/oradata
    how can i check space becuase is have enough space
    Edited by: Tshifhiwa on 2012/01/27 2:40 PM
    i type free -m
    total used free shared buffers cached
    Mem: 1988 1844 143 0 36 1365
    -/+ buffers/cache: 443 1545
    Swap: 3999 0 3999
    Edited by: Tshifhiwa on 2012/01/27 2:40 PM
    Edited by: Tshifhiwa on 2012/01/27 3:44 PM
    Edited by: Tshifhiwa on 2012/01/27 4:05 PM<Sigh!>
    http://lmgtfy.com/?q=check+disk+space+in+linux

  • Available disk space.

    Hello Guys,
    I would like to ask that do any of you know a way to find the available disk space left to be used by the data files in the database. Scenario is that what would happen if the available disk space on the server is very less or let's say its 1% free and this time the datafile needs some space to expand (automatically). It will give an error and the process is screwed up. Solution 1. Monitoring on the OS level, but what if the OS level solution fails to warn the administrator? Can we detect this via the database?
    We are using Oracle 9i RAC on HP-UX, i can do this on HP-UX but i would like to know if there is a way to find this in Oracle Database?
    Thanks in advance,
    Cheers!!

    OEM can be one option which can generate alerts if the disk is about to full other than that I there is no database view which can tell you the details of disk space, from database you can query OS like using host in sqlplus and then parse the result but I dont know why any1 want to do that because you can do this better with some shell or perl script.
    Thanks
    Daljit Singh

  • How to get available disk space for a disk in the system ?

    hi all,
    I need to figure out the available disk space for a particular disk before I can write my file to a directory in the disk. I do this to avoid unsufficient disk space problem in my program. May I know how can I do this in Java ? I look at the API function for java.io.File class but there isn't any function to check disk space. I would appreciate any help from fellow Java developers. Thanks a million.
    regards,
    tuck meng

    You cannot do this in purely platform independent way.
    You can use System.exec to run native OS utilities like df and parse the output, but then you have to knwo which platform your program is running on, or build in some automatic detection of OS and have corresponding native calls for each likely one.
    BTW. even if you get a number of free bytes on disk that's larger than the size of the file you want to write this is no guarantee that there will be enough diskspace for your file, because another process might write to the disk in the meantime. So you will have to do proper error handling and recover gracefully from the disk full sitution no matter what.

  • Insufficient disk space for SunStudio 12

    Hello,
    I am fairly new to Solaris (was on Linux before) but anyway I tried to install SunStudio 12. Prepare went well but when I ran install script:
    *./batch_installer -p all --accept-sla*
    or even GUI installation:
    *./installer &*
    there was following report displayed:
    Installation failed: insufficient disk space.
    Then i did df -kh to check disk space and got output as follows:
    Filesystem size used avail capacity Mounted on
    /dev/dsk/c0d1s0 4,6G 4,4G 98M 98% /
    /devices 0K 0K 0K 0% /devices
    ctfs 0K 0K 0K 0% /system/contract
    proc 0K 0K 0K 0% /proc
    mnttab 0K 0K 0K 0% /etc/mnttab
    swap 2,2G 692K 2,2G 1% /etc/svc/volatile
    objfs 0K 0K 0K 0% /system/object
    /usr/lib/libc/libc_hwcap2.so.1 4,6G 4,4G 98M 98% /lib/libc.so.1
    fd 0K 0K 0K 0% /dev/fd
    swap 2,2G 48K 2,2G 1% /tmp
    swap 2,2G 24K 2,2G 1% /var/run
    /dev/dsk/c0d1s7 33G 1,2G 31G 4% /export/home
    Then I tried to redirect installation to /export/home just to test what report will
    be now. There was same report again regardless of *31GB* of available space.
    So, am I missing something here ?
    Any idea would be welcome. Thank you.
    Josip

    I think the problem is that there is not enough space in / filesystem:
    /dev/dsk/c0d1s0 4,6G 4,4G 98M 98% /
    It has only 98 Mb free. By default Sun Studio is installed at /opt, which is a directory in / filesystem.
    I'd suggest you to extract Sun Studio Express from the tar.gz file. You can download it from this page:
    http://developers.sun.com/sunstudio/downloads/express/index.jsp
    Extract it somewhere (say /export/home/ss12), set PATH and run compilers and tools.
    Thanks,
    Nik

  • Disk Space Required to Install BOXI R2 SP 2 and SP 3

    I have been unable to locate documentation stating how much disk space is required for the installation of BOXI Release 2 Service Packs 2 and 3. We are scheduled to upgrade our servers tomorrow and I have just discovered that we only have about 1.3 GB free space.  Will that be sufficient for the installs?
    Thanks. L. Sohn.

    Hi Lois,
    System requirements
    u2022 Java application server (unless you install Tomcat with your installation of  BusinessObjects Enterprise)
    u2022 512 MB RAM minimum, 1 G recommended
    u2022 3 GB free disk space
    u2022 Database software that is compatible with the CMS (unless you install MySQL during the BusinessObjects Enterprise installation)
    This requirement is for the installation of BOE XI R2.
    I hope that helps you.
    Prashant
    Edited by: Prashant Saduwale on Nov 10, 2008 7:46 PM

  • Database msdb cannot be opened due to inaccessible files or insufficient memory or disk space - in recovery pending status

    came in this fine monday morning and it looks like developers were running some kind of trace that filled the primary DATA folder with about 80,000 5mb trace files.  now that process has stopped and the logfiles have been cleaned up, but when attempting to connect to the server using the management console i get the error:
    Database 'msdb' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details. (.Net SqlClient Data Provider)
    when i check the status it is in recovery pending mode.  i have a backup from yesterday but im not sure if this database became corrupt before that backup or not because this process was ongoing over the weekend.  the last timestamp on the msdb and log files is 7am this morning.. 
    I am not sure how to proceed recovering the msdb database with limiting interruption to the users.  any advice is extremely appreciated.  this is sql server 2008.  i can login via sqlcmd and see it is in recovery pending status:
    1> select state_desc databasestatus_sysdtabase from
    2> sys.databases where name ='msdb'
    3> go
    select state_desc databasestatus_sysdtabase from
    sys.databases where name ='msdb'
    databasestatus_sysdtabase
    RECOVERY_PENDING
    (1 rows affected)
    1>

    For someone experiencing a similar problem this answer is unacceptable. You're basically telling me to reboot the server to fix this.  You vaguely mention using process explorer to find out who is using the file.  Can you please provide
    some more information on that?  I have a similar problem and rebooting the server to fix it is not an option.  This problem keeps reoccurring.
    OS Error 32 means file has an open handle by someone else. If that is a user process then you can catch it via Process Explorer. If it's a kernel mode object then it's difficult to catch that and restart is the only choice.
    http://sqlserver-help.com/2014/08/07/tips-and-tricks-os-error-32the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • SQCRS_Exec: State:42000 Error:[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate a new page for database 'MEDICAL' because of insufficient disk space in filegroup 'PRIMARY'.

    I keep getting this error even though I have done all the suggestions. This was a restored database everything worked well for 2 days and now i am getting this error. I have autogrowth on and have shrunk the TransLog to 60mb the 2 table spaces that getr
    this error have been checked by several DBA's and they all say it is correct and to check with Microsoft. DBCC CHECKDB has also been run along with a native check for our Medical program. The DB is not abnormally large as I have others much larger. this is
    Server 2008r2 with SSMS 2008r2

    Add another file to the PRIMARY FILE GROUP on another drive.
    Above is a quick & dirty fix.
    You should makeup a disk space allocation plan keeping in mind the requirements 3 years from now.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Workshop 6u1 installation freezes when checking for disk space

    Hi!
    I've trying to install Workshop 6 update 1 but while installing and the application is checking for disk space it just freezes on me. One important thing, this system had Workshop 4, 6u1 and 6u2 installed. I removed the package for ws4 and untinstalled ws6u1 and ws6u2 from /var/sadm/prod/com.forte....... for each one of the versions.
    Do you have any idea what is going on, why it freezes when checking for disk space???
    thanks,
    Jorge

    Hi,
    command: cmd.exe /c D:\oracle e-business suite R12\oracle ebusiness suite\startCD\Disk1\rapidwiz\bin\adchkutl.cmd C:\cygwin C:\msvc
    'D:\oracle' is not recognized as an internal or external command,
    operable program or batch file.
    RW-50011: Error: - System Utilities Availability test has returned an error: 1Please do not use spaces in directory names, spaces are not allowed and it is expected to get such errors because of the spaces.
    Host/Domain
    command: ping -n 1 windows7-pc
    Pinging WINDOWS7-PC [fe80::4c7b:9a58:f4b2:e7c5%12] with 32 bytes of data:Please note that Windows 7 is not certified as a database/application tier node.
    Thanks,
    Hussein

  • Checking OS disk space

    Hi, everybody !
    I would like to know, using a Oracle procedure, the Windows Disk Space.
    For example, if my Oracle database have datafile in two drives (D: and E:) and I'd like to know the disk size and free disk space, is it possible using a procedure ?
    I tried with a java program, compiled as java source but i am facing some errors.
    Thanks in advance,
    Joao Lanaro

    Hi, everybody "
    To me there is not wrong, but let me explain, I have an instance used to monitoring another Oracle instances, so one of these checks is how much free OS disk space is available in each server.
    I am using the Oracle scheduler to execute it sometimes per day. Because this I thougth that a procedure is the better option, I found a java program but I do not know so much Java and I could not fix the errors.
    If I use a batch file, as you said, How can I use it into a procedure, How can I get the return of dir and use it to subtract or sum with my datafiles size ?
    Thanks in advance,

  • I am not able to update iTunes keeps popping up message saying no free disk space I checked and there is enough to support the upgrade but I cant figure out why it wont let me. Help anyone!

    So heres the deal, I updated my iphone and in order to put any music on it or even ringtones I have to have the most updated version of iTunes, unfortunately my macbook wont allow the update, I do have a lot of pictures and song stored on here but I have no documents I have deleted everything the only thing left on here is what the macbook came with. I checked and it says that I have enough memory so is there another reason I cant update. When I try and check for the update option in iTunes it says its up to date but I have version 10 something so I know its old, I haven't been able to update anything on here. Do I have to take it to the store or is there something that I can fix on my own because my warranty is up and I have nothing but problems when I go into an actual apple store.

    If you want to try to clear even more disk space see https://discussions.apple.com/thread/5872318?tstart=0

Maybe you are looking for

  • Database Performance Comparison on Linux n WindowNT

    Hi Everybody, We have an Application running on Oracle7.3 n WindowNT. Now we are shifting this to Oracle8i (Rel 2). OS platform is not yet decided. We are asked to submit a performance report of Oracle8i on Linux and Oracle8i on WindowsNT. How can we

  • 2.0.1 SnappierTM

    Yes, it's a cliche but 2.0.1 definitely seems snappier! Don't know how the other bugs are faring; time will tell. How about you?

  • Session state replication

    Hi. Has anyone got the session replication in OC4J to work on Windows 2000? We're running a 9.0.2 infrastructure and two clustered 9.0.3 9iAS application servers, that are supposed to replicate HTTPServletSession state. We are using the default_islan

  • Master image not available?

    after downloading my pics from a sd card, my photos sow that master image is not available. can someone help? i am a new mom and all the pictures are of my son. i have deleted them from the sd card. I am not fmiliar with aperture so sorry if this is

  • IPhone 5c searching network or no serviceo

    i have searching or no service most of the time. I've had new handset & sim card. Im wwith EE & no problem with their end. The carrier icon keeps disappearing. I've reset network settings, reset to factory settings as new phone. i occasionally get a