Results 1 to 2 of 2

Thread: Device Space

  1. #1
    Join Date
    Jul 2006
    Posts
    3

    Question Unanswered: Device Space

    How do u quickly tell free device space at the sybase cmd line ?

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    This should work (assumes ASE 12.5.x - it may not work in 15)

    Code:
    select d.name
           , size=avg((d.high-d.low+1)/512)
           , used=sum(u.size*@@maxpagesize/1024/1024)
           ,free= avg((d.high-d.low+1)/512)-sum(u.size*@@maxpagesize/1024/1024)
      from master..sysdevices d
           , master..sysusages u
     where u.vstart between d.low and d.high
     group by d.name
    Results in MB.

    Michael

Posting Permissions

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