Link to home
Start Free TrialLog in
Avatar of Daniel Wilson
Daniel WilsonFlag for United States of America

asked on

How to drop a SQL Server SERVICE without CRAZY log activity

A customer has an MSDB instance that is about 140GB.  The problem is a monster message queue w/ over 70 million records.  It's for a 3rd-party tool they haven't used in years.

Like this, only several times bigger:  http://www.sqlservercentral.com/Forums/Topic883785-146-1.aspx

I have not been able to disable broker on MSDB b/c we can't put MSDB into single-user mode on weekdays.  May try that tomorrow.

But when I run the DROP SERVICE statement (which attempts to empty the queue), the TLog grows to fill the disk.  Last night it ate nearly 500 GB before being out of space and rolling back.

The entire MDF is about 140 GB.  But TLog for dropping this service wants over 500 GB.  They're talking about attaching a 1TB USB drive, but I don't know whether that would be enough either!

How much space should I expect it to take?  And is there another way?  I've been over the documentation and all I'm sure of is that I can't TRUNCATE the QUEUE -- which is what I'd really, REALLY like to do.

Thanks
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

check and try the below solutions (what is your biggest table there?)

SQL Server Database Mail Cleanup Procedures
http://www.mssqltips.com/sqlservertip/1732/sql-server-database-mail-cleanup-procedures/


Analyze and Correct a large SQL Server MSDB Database
http://www.mssqltips.com/sqlservertip/1461/analyze-and-correct-a-large-sql-server-msdb-database/
Avatar of Daniel Wilson

ASKER

The monster is a queue.

The index on it is queue_message_155...
The queue is _Lakeside_dbTools_Waits_LogOutQueue

I have managed to disable the broker on MSDB.  I made MSDB single-user for a few minutes to do so.

One cannot delete from or truncate a queue. http://msdn.microsoft.com/en-us/library/ms190495.aspx

One thing the DROP SERVICE command does is empty the queue.  But that pushes my log to 500 GB.

Do you have other suggestions?
SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Eugene, I appreciate the ideas, but they really didn't get me there.  Still, thanks for taking the time to look into it.