Solved

How to drop a SQL Server SERVICE without CRAZY log activity

Posted on 2013-01-25
5
403 Views
Last Modified: 2013-01-30
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
0
Comment
Question by:Daniel Wilson
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:EugeneZ
ID: 38818804
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/
0
 
LVL 32

Author Comment

by:Daniel Wilson
ID: 38818848
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?
0
 
LVL 42

Assisted Solution

by:EugeneZ
EugeneZ earned 500 total points
ID: 38818939
it does not look like the standard msdb queue  _Lakeside_dbTools_Waits_LogOutQueue

check \try and if you think it will not affect your application

DROP QUEUE
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_28008574.html#a38818804

--
try to check where from this communicated (sp_who\sp_who2\3)
0
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 0 total points
ID: 38819036
OK, I got rough with it:

ALTER DATABASE [msdb] SET NEW_BROKER WITH ROLLBACK IMMEDIATE;

After which I could drop the service and then the queue.

Thanks for the help.
0
 
LVL 32

Author Closing Comment

by:Daniel Wilson
ID: 38834519
Eugene, I appreciate the ideas, but they really didn't get me there.  Still, thanks for taking the time to look into it.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now