|
Hi, I have the following situation: Database with 1 datafile in primary filegroup, 16 datafiles in 3 other filegroups. There is no userdata in the primary filegroup. This database is a principal in an async mirror. The primary datafile is currently 90GB (yes gigabyte) keeps growing, but when I query sysindexes results in 307MB. I tried to shrink this file, but it could only shrink to 83 GB. I assume mirroring is causing this, but this is not normal. There are som queue_message* files but these are empty. Any ideas what's filling my PRIMARY datafile and how to get rid of it?
(comments are locked)
|
|
I think I found the answer. According to this query: select sa., sp., object_name(sp.object_id) from sys.allocation_units sa join sys.partitions sp on sa.container_id = sp.hobt_id where sa.data_space_id = 1 order by sa.total_pages descit seems to be LOB_DATA.
(comments are locked)
|
|
Are you querying from sysindexes? Try looking in database_files and let us know what it returns for the primary filegroup He is querying sysindexes - it wan't clear, so I reformatted is question
Dec 03 '10 at 01:02 PM
WilliamD
The free space is reported by this query is the same as I see in SSMS. Note: I use sysindexes because of the dpages column (which is not in sys.indexes). I got some more info when querying sys.allocation_units, but I need to examine this resultset.
Dec 03 '10 at 11:47 PM
Wilfred van Dijk
See Method 1 http://support.microsoft.com/kb/937531
Dec 04 '10 at 01:11 AM
Scot Hauder
(comments are locked)
|
|
You shrunk with TRUNCATEONLY? What if you create another file for PRIMARY and perform a DBCC SHRINKFILE with EMPTYFILE on the original file? Can't actually "play" on a live system ... And I want to know what's causing this problem
Dec 03 '10 at 11:47 PM
Wilfred van Dijk
(comments are locked)
|

