Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    191

    Unanswered: Is there a way....

    Is there a way to monitor the disk space using a dbcc?

    Thanks

    Lystra

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Free disk space can be monitored with an extended stored procedure xp_fixeddrives. This procedure only exists in the master database, so if you try to run it from pubs, you have to fully qualify it as

    exec master..xp_fixeddrives

  3. #3
    Join Date
    Jul 2004
    Posts
    191
    Thanks, can you also keep a running total or something like keep track

    Lystra

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    You would want a more permanent table, but I think you are up to converting the example...

    Code:
    create table #temp
    (drive char(1),
     freespace int,
     AsOfDate datetime default (getdate()))
    
    insert into #temp (drive, freespace)
    exec master..xp_fixeddrives
    
    select *
    from #temp
    
    drop table #temp

  5. #5
    Join Date
    Jul 2004
    Posts
    191
    Thanks, Thanks very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •