I received alert that tempdb is going to be full and temp table name aslo provided. Now I want to know how to check which spid is filling tempdb from temp tablename.

  • 5
    Sybase uses a different system table structure than SQLServer, so I don't think it's a duplicate. Commented Feb 18, 2014 at 3:16

2 Answers 2


The best is to use the montables. Make sure you have mon tables activated. Once verified you can issue the following select statement:

select SPID, DBName, ObjectName, PartitionSize
from master..monProcessObject
where DBID = tempdb_id(SPID)
order by SPID

for more information please see the official Sybase docs: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00967.1550/html/MigrationGuide/MigrationGuide14.htm


Note that the above query against monProcessObject doesn't detect 'implicit' tempdb usage. Ie., usage from an 'order by', 'group by' or other internal/hidden tempdb based worktables used by the query optimizer operations.

To monitor tempdb usage for a for implicit and explicit usage, try:

select spid,tempdb_pages=pssinfo(spid,"tempdb_pages")
from master..sysprocesses

This pssinfo function is available at least in version 15.5 and higher. Not sure about 12.5.4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.