Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mmcnary
Starting Member
16 Posts |
Posted - 2010-06-01 : 11:10:46
|
I inherited an instance with a 65GB (yes gigabyte!) msdb. This is sql2008. I have verified that I do not have excessive backup history:select count(*) from backupfile -----------252select count(*) from backupmediafamily -----------112select count(*) from backupmediaset -----------112select count(*) from backupset -----------112I have verified that I do not have any email attachments taking up space:DECLARE @GETDATE datetimeSET @GETDATE = GETDATE()EXECUTE msdb.dbo.sysmail_delete_mailitems_sp @sent_before = @GETDATE(0 row(s) affected)I ran sp_spaceused against all of the tables in msdb and the largest two are these, which take up 4MB and 1.4MB:sp_spaceused sysssispackages name rows reserved data index_size unused-------------------------------------------------------------------------------------------------------------------------------- ----------- ------------------ ------------------ ------------------ ------------------sysssispackages 14 4048 KB 3968 KB 24 KB 56 KBsp_spaceused sysjobhistory name rows reserved data index_size unused-------------------------------------------------------------------------------------------------------------------------------- ----------- ------------------ ------------------ ------------------ ------------------sysjobhistory 258 1432 KB 864 KB 168 KB 400 KBsp_spaceused on msdb gets me this:database_name database_size unallocated spacemsdb 63616.25 MB 6.82 MBreserved data index_size unused65134776 KB 64540464 KB 584704 KB 9608 KBI would prefer to avoid re-creating the msdb database, if possible.Any thoughts?Thanx, -Mark McNary |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
mmcnary
Starting Member
16 Posts |
Posted - 2010-06-01 : 12:46:34
|
Whether I run shrink database or shrink data file, it still stays the same. I forgot to mention that I have done these steps also:use msdbgoexec sp_updatestatsgodbcc updateusage('msdb') WITH COUNT_ROWSgoI did not rebuild indexes.Thanx, -Mark McNary |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
mmcnary
Starting Member
16 Posts |
Posted - 2010-06-01 : 16:41:28
|
I found this and it seems to be working:http://www.simple-talk.com/community/blogs/rodney/default.aspx Someone turned on service broker, and it has been logging error messages for over a year. I am running END CONVERSATION '{@conversation_handle}' WITH CLEANUP ; and it is getting rid of the data in the sys.sysxmitqueue table. |
 |
|
|
|
|