You are not logged in or registered. Please login or register to use the full functionality of this SYBASETEAM.COM Website...
Current time: 02-09-2010, 10:25 AM Hello There, Guest! (LoginRegister)
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
monitor sybase tempdb log space
04-22-2009, 01:58 AM
Post: #1
monitor sybase tempdb log space
Hi all,

You can use the below script which can be also be configured to send an email alert if the sybase tempdb free data or log space falls below 10% . i.e., tempdb
monitoring script.

select
"Data Size," = str(sum(size * abs(sign(segmap - 4))) / 512.0, 7, 2)+',',
"Data Used," = str(sum((size - curunreservedpgs(dbid, lstart, unreservedpgs)) * abs(sign(segmap - 4))) / 512.0, 7, 2)+',',
"Data Free," = str(100.0 * sum((curunreservedpgs(dbid, lstart,unreservedpgs)) * abs(sign(segmap - 4))) / sum(size * abs(sign(segmap- 4))), 3) + "%"+',',
"Log Size," = str(sum(size * (1 - abs(sign(segmap - 4)))) / 512.0, 7, 2)+',',
"Log Used," = str(sum((size - curunreservedpgs(dbid, lstart, unreservedpgs))* (1 - abs(sign(segmap - 4)))) / 512.0, 7, 2)+',',
"Log Free" = str(100.0 * sum((curunreservedpgs(dbid, lstart,unreservedpgs))* (1 - abs(sign(segmap - 4)))) / sum(size * (1 - abs(sign(segmap - 4)))), 3) + "%"
from master..sysusages
where segmap < 5
and dbid=2


you have to use conditional shell commands to check if the Log/Data free < threshold.
Find all posts by this user
Quote this message in a reply

Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Sybase Database dump failed for a database with no space left on device error padalav 0 98 01-28-2010 10:37 AM
Last Post: padalav
  How to get the max tempdb usage and max log file usage for user database till date GANESHBSUTAR 3 155 01-07-2010 10:49 PM
Last Post: Joshi
  Using Solaris tmpfs for a tempdb Device in Sybase ASE albert 0 77 12-20-2009 03:54 PM
Last Post: albert
  Determining Free Log Space in Sybase ASE Joshi 0 183 12-04-2009 09:47 PM
Last Post: Joshi
  find out the size of tables and indexes in any tempdb john 0 114 12-03-2009 05:45 PM
Last Post: john
  Using Solaris temp filesystem tmpfs for a Sybase tempdb device Kishor 0 89 07-01-2009 02:11 AM
Last Post: Kishor
  log space requirements for reorg rebuild ishu.cs 0 154 05-27-2009 01:29 PM
Last Post: ishu.cs
  Sybase ASE Monitoring (Monitor databases,resources,error log ..)- Best Practices john 0 288 05-24-2009 06:04 PM
Last Post: john
  How do I move sybase tempdb off of the Master Device? sybasegeek 0 122 04-27-2009 11:19 AM
Last Post: sybasegeek
  Monitor Sybase log - SQL script to monitor syslogs and capture output albert 0 343 04-16-2009 03:25 AM
Last Post: albert

Forum Jump: