So we encountered a scenario some time back (unfortunately I should have done this sooner, and the details may be a little fuzzy) and I've been tasked with being able account for it going forward.
We have a two node, synchronous Availability Group that does NOT fail over automatically. This environment is an 8 terabyte data warehouse. Every night about 1500 jobs run that gather data from lots of different sources.
We had maintenance occur in this environment and the developers didn't stop their jobs before the maintenance started. Our SA did maintenance on the Primary first, and then on the Secondary. Once the Secondary came back online, it was in an In Recovery state for a while (like 30 - 45 minutes) before it was finally usable. During this time of course the developers wanted to restart their jobs, and I told them "no". My logic being that I didn't want the transaction log on the Primary to fill up. Since it can't truncate until all the data is committed on the Secondary, and since the Secondary was already behind, I didn't want to make matters worse. Of course I was loved by some and hated by others for this decision, but that's the life of a DBA.
DMV's are accumulative since the last restart. The Dashboard, while useful, doesn't really allow me to tell people how long until they can restart their jobs. So what can be used to make this determination?
Thanks!
Thanks in advance! ChrisRDBA