Home Forums SQL Server 2005 Administering shrink fails with error - File ID of database ID cannot be shrunk as it is either being shrunk by another process or is empty RE: shrink fails with error - File ID of database ID cannot be shrunk as it is either being shrunk by another process or is empty

  • ,

    (SUM(unallocated_extent_page_count)*1.0/128) AS [free space in MB]

    FROM sys.dm_db_file_space_usage;

    SELECT DB_NAME(dbid) AS DBNAME,

    (SELECT text FROM sys.dm_exec_sql_text(sql_handle)) AS SQLSTATEMENT, *

    FROM master..sysprocesses

    WHERE open_tran > 0

    here are some things that might be nice to track during the time the tempdb is growing, just make a job and some tables and run these into tables every min and it should give an idea to what is causing your pain...