Sproc to check space usage for a server....

  • Need to check free space on a server... XP_Fixeddrive??

  • Yes if all you want if the FreeSpace (without total space).

    If you really want to use SQL server you can use fsutil (in xp_cmdshell 'fsutil volume diskfree C:') to get the total space on top of what you get with XP_FixedDrives.

    It's much easier to get it with a wmi query though (even easier to use in powershell).

  • Got it. Also, is this backup being made over the network?

    EXECUTE master..sqlbackup N'-SQL "BACKUP DATABASE [Outnow] TO DISK = ''\\dbsrvr1a\outnow\Outnow.sqb'' WITH COMPRESSION = 2, MAXTRANSFERSIZE = 1048576"', @exitcode OUT, @sqlerrorcode OUT

  • Yes it is written to a network share '\\dbsrvr1a\outnow\Outnow.sqb''

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply