Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Tempdb MDF file is increasing and not I am not able to shrink it.

$
0
0

Output of below query is

  SELECT session_id,
       SUM(internal_objects_alloc_page_count) AS task_internal_objects_alloc_page_count,
       SUM(internal_objects_dealloc_page_count) AS task_internal_objects_dealloc_page_count
     FROM sys.dm_db_task_space_usage  where internal_objects_alloc_page_count >10 and session_id> 50
     GROUP BY session_id; 

SELECT SUM(internal_object_reserved_page_count) AS [internal object pages used],
 (SUM(internal_object_reserved_page_count)*1.0/128) AS [internal object space in MB]
 FROM sys.dm_db_file_space_usage;

internal object pages used  internal object space in MB

3552     27.750000

----------------------------------

SELECT SUM(unallocated_extent_page_count) AS [free pages],
 (SUM(unallocated_extent_page_count)*1.0/128) AS [free space in MB]
 FROM sys.dm_db_file_space_usage;

 3559272    27806.812500

Database MDF is 27806 MB and I tried to shrink but unable to shrink. It is production server.I do not want Restart sql server.

There is no open transaction.

Any one suggestion





Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>