Sunday, December 25, 2011

orphan tables in tempdb

If an spid that owns the table no longer exists in sysprocesses.
This happens sometimes when a killed spid isn't cleaned up properly,
leaving temp tables behind.  These are called "orphaned" temp tables.

Running

    dbcc orphantables


will list orphaned tables in tempdb .

    dbcc orphantables ("drop")


will try to clean them up.
If an spid that owns the table no longer exists in sysprocesses.
This happens sometimes when a killed spid isn't cleaned up properly,
leaving temp tables behind.  These are called "orphaned" temp tables.

Running

    dbcc orphantables


will list orphaned tables in tempdb .

    dbcc orphantables ("drop")


will try to clean them up.

0 comments:

Post a Comment