2

I have SQL Server mirroring set up between two 2008R2 SQL Server instances. I have multiple databases mirrored. Prior to planned failover to the backup server I want to turn off the SQL Server Agent on the primary server so I don't have jobs running and failing while the DB is running from the failover server. (I'm trying to patch my primary database server.)

However I'm not sure how dependent mirroring is on the SQL Server Agent. Will mirroring continue to function with SQL Server Agent off?

I've seen articles that say mirroring is dependent on SQL Server Agent but I'm unsure if that is just for some sort of routine cleanup or if that is a requirement for mirroring to function. I'm assuming just cleanup but I'd like to know more and I'm struggling to find answers to this exact question.

Thanks for any help you can give me (programmer wearing a newb-dba hat).

2 Answers 2

1

Mirroring is not dependent on SQL Server Agent running. Communication between primary and secondary happens using TCPIP ports. In database mirroring, principal and mirror server communicate through TCP connection and write data change directly to remote transaction log file.

But if you want to monitor and get alerted you need the agent job running which get created automatically when you set up mirroring. Details below:

0

No, database mirroring is not dependent on the SQL Server Agent running.

There is however a job that is scheduled to run every 1 minute to update the monitoring status of the mirrored databases.

This is all it does:

exec sys.sp_dbmmonitorupdate 

That said you can reduce the impact of other SQL Server Agent jobs during the upgrade process by disabling the individual jobs instead of stopping the SQL Server Agent.

Then I would recommend performing the SQL Server upgrade/update using the recommended steps outlined in the Microsoft Docs article:

Upgrading Mirrored Instances

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.