Microsoft – SQLServer – Expensive Query – “fetch next from dbmCursor into @database_id”

Microsoft – SQLServer – Expensive Query – “fetch next from dbmCursor into @database_id”

Reviewing a couple of MS SQL Server Instances and one of the Queries that was cited as expensive is:


   fetch next 
   from dbmCursor 
   into @database_id

Was not so sure where it came from.

So Google for it and found it here:

http://www.sqlsentry.net/downloads/scripts/Create_Sentry_dbmmupdate.sql

[msdb].[dbo].[sp_Sentry_dbmmonitorupdate]

So it looks like it is part of “Database Mirroring Monitor Job”

So if you deem it a bit expensive, review your “SQL Server Agent” jobs and disable “Database Mirroring Monitor Job”.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s