Sql-server – Is SQL Server Mirroring dependent on SQL Server Agent running

mirroringsql-server-2008-r2sql-server-agent

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).

Best Answer

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: