Misunderstanding 10. database images can be found immediately after a fault occurs
Error
The database mirroring technology is widely publicized on the market. After a fault occurs, it can immediately detect the error and perform failover.
However, this is not the case. The speed at which a fault is detected depends on the fault type.
The fastest possible cause of a fault detection is that the main instance in the image crashes, so that the PING of the image server once per second cannot return a value, it is known that the process no longer listens to the corresponding TCP port on the main server. In this case, the backup storage can detect faults almost instantly.
The second major cause of failure is the operating system crash of the main server. At this time, the master server no longer responds to the PING request from the backup server, so that an error is found after the Backup Server PING times out. The default timeout threshold is 10 seconds. But you can also extend this time. At this time, the fault occurrence time depends entirely on the PING timeout time.
The third fastest fault detected is that the log disk of the subject is unavailable. At this time, SQL SERVER still initiates IO requests, but 20 seconds of IO wait until the log cannot be written, and the log disk is unavailable, in the end, the disk log is declared unavailable after 40 seconds, so that the backup storage can be launched online. SQL server is very patient. For example, for a lock, SQL SERVER will wait for the lock infinitely, unless it encounters a deadlock.
In addition, damaged pages may not cause faults at all. If the query reports a 823 or 824 error, the image technology will not be concerned at all (this problem is fixed after SQL server 2008: SQL Server 2008: automatic Page Repair with Database FLUSHING). If a 823 or 824 error occurs during data rollback, the Database will immediately become in question, that is, logs and data are inconsistent. This will also cause image failure.
The principles you learned in the Bible do not need to be fully adhered :-)