%3CLINGO-SUB%20id%3D%22lingo-sub-1583525%22%20slang%3D%22en-US%22%3EHow%20to%20configure%20the%20WSFC%20AG%20failover%20policy%20when%20the%20database%20level%20health%20detection%20enabled%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1583525%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20database%20level%20health%20detection%20failover%20option%20introduced%20on%20this%20article%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fsql%252Fdatabase-engine%252Favailability-groups%252Fwindows%252Fsql-server-always-on-database-health-detection-failover-option%253Fview%253Dsql-server-ver15%26amp%3Bdata%3D02%257C01%257Clduan%2540microsoft.com%257C523f63d44d114ce2c34008d81de0022e%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637292195270232469%26amp%3Bsdata%3DanQCNDsR%252B5n75uala0SnuOnvFp1CrsVp8i0U9gpQlTY%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Favailability-groups%2Fwindows%2Fsql-server-always-on-database-health-detection-failover-option%3Fview%3Dsql-server-ver15%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.5pt%3B%20color%3A%20%23333333%3B%22%3E%3CSPAN%20style%3D%22background%3A%20white%3B%22%3EIn%20addition%20to%20the%20existing%20checks%2C%20the%20new%20implementation%20has%20the%20following%20additional%20checks.%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%20style%3D%22margin-left%3A%20.375in%3B%20direction%3A%20ltr%3B%20unicode-bidi%3A%20embed%3B%20margin-top%3A%200in%3B%20margin-bottom%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.5pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%20type%3D%221%22%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%20color%3A%20%23333333%3B%22%20value%3D%221%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.5pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%20background%3A%20white%3B%22%3EThe%20new%20implementation%20stores%20and%20uses%20a%20historical%20snapshot%20of%20the%20database%20state%20information%20to%20decide%20if%20the%20AG%20needs%20to%20be%20marked%20in%20error%20state%20or%20not.%20The%20health%20check%20routine%20caches%20the%20database%20state%20and%20associated%20error%20information%2C%20for%20the%20last%20three%20executions%2C%20which%20is%20then%20compared%20with%20the%20state%20information%20from%20the%20current%20execution%20of%20the%20health%20detection%20routine.%20If%20the%20same%20error%20condition%20(for%20the%20below%20mentioned%20error%20codes)%20exists%20in%20the%20four%20consecutive%20runs%20of%20the%20health%20detection%20routine%2C%20a%20failover%20is%20initiated.%20So%20for%20example%20if%20during%20the%20first%20run%2C%20let's%20say%20at%2022%3A00%3A00%20there%20is%20an%20error%20823%2C%20and%20the%20same%20error%20conditions%20exists%20at%20the%20subsequent%20runs%20at%2022%3A00%3A10%2C%2022%3A00%3A20%20and%2022%3A00%3A30%20then%20the%20AG%20is%20marked%20in%20an%20error%20state%20and%20the%20control%20is%20passed%20to%20the%20cluster.%20This%20implementation%20is%20intended%20to%20provide%20safeguards%20against%20transient%20errors%20and%20issues%20which%20can%20be%20fixed%20by%20the%20auto%20page%20repair%20capabilities%20of%20the%20availability%20groups.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%20color%3A%20%23333333%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.5pt%3B%20background%3A%20white%3B%22%3EThe%20new%20implementation%20checks%20for%20following%20additional%20errors.%20Majority%20of%20these%20errors%20are%20indicative%20of%20a%20hardware%20issues%20on%20the%20server.%20Please%20note%2C%20that%20this%20is%20not%20an%20exhaustive%20list%20of%20errors%20which%20could%20impact%20the%20database%20availability.%20There%20is%20an%20outstanding%20item%20to%20include%20error%20824%20to%20this%20list.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CDIV%20style%3D%22direction%3A%20ltr%3B%22%3E%0A%3CTABLE%20style%3D%22direction%3A%20ltr%3B%20border-collapse%3A%20collapse%3B%20margin-left%3A%20.3333in%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%20title%3D%22%22%20border%3D%221%22%20summary%3D%22%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%234f81bd%3B%20vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20white%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EError%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%234f81bd%3B%20vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20white%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3ECause%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%234f81bd%3B%20vertical-align%3A%20top%3B%20width%3A%208.2458in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20white%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EDocumentation%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E605%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EPage%20or%20allocation%20corruption.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%208.2763in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-605-database-engine-error%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%209.0pt%3B%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-605-database-engine-error%3Fview%3Dsql-server-2017%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E823%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ECheckpoint%20failures.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%208.2763in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-823-database-engine-error%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%209.0pt%3B%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-823-database-engine-error%3Fview%3Dsql-server-2017%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E829%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EDisk%20corruption.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%208.2173in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22zh-CN%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E832%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EHardware%20or%20memory%20corruption.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%208.2173in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22zh-CN%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E1101%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ENo%20disk%20space%20available%20in%20a%20filegroup.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%208.35in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-1101-database-engine-error%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%209.0pt%3B%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-1101-database-engine-error%3Fview%3Dsql-server-2017%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E1105%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ENo%20disk%20space%20available%20in%20a%20filegroup.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%208.35in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-1105-database-engine-error%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%209.0pt%3B%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-1105-database-engine-error%3Fview%3Dsql-server-2017%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E5102%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EMissing%26nbsp%3Bfilegroup%20ID%26nbsp%3Brequests.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%208.2173in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22zh-CN%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E5180%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EWrong%26nbsp%3Bfile%26nbsp%3BID%20requests.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%208.2173in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22zh-CN%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E5515%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%208.35in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-5515-database-engine-error%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%209.0pt%3B%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-5515-database-engine-error%3Fview%3Dsql-server-2017%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E5534%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%203.6631in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ELog%20corruption%26nbsp%3Bdue%20to%26nbsp%3BFILESTREAM%20operation%20log%20record.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%208.1986in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22zh-CN%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E5535%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EFILESTREAM%20data%20container%20corruption.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22background-color%3A%20%23dbe5f1%3B%20vertical-align%3A%20top%3B%20width%3A%208.2173in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22zh-CN%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%20.6673in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%207pt%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%20color%3A%20black%3B%20text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3E9004%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%203.6437in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%20font-size%3A%209.0pt%3B%22%3E%26nbsp%3BLog%20Corruption%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22vertical-align%3A%20top%3B%20width%3A%208.35in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%20border%3A%201pt%20solid%20%23A3A3A3%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Microsoft%20YaHei'%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-9004-database-engine-error%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%209.0pt%3B%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Ferrors-events%2Fmssqlserver-9004-database-engine-error%3Fview%3Dsql-server-2017%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20we%20enable%20this%20feature%2C%20to%20make%20sure%20AG%20can%20failover%20successfully%2C%20we%20need%20to%20change%20the%20default%20failover%20policy.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20default%20%E2%80%9Cmax%20restarts%20in%20the%20specified%20Period%20%3D1%20in%201%20hour%3C%2FP%3E%0A%3CP%3EThe%20default%20%E2%80%9Cmax%20failure%20in%20the%20specified%20Period%E2%80%9D%20%3D1%20in%206%26nbsp%3B%20hours%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorlduan_dsd_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20id%3D%22tinyMceEditorlduan_dsd_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20id%3D%22tinyMceEditorlduan_dsd_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EBased%20on%20this%20settings%2C%20if%20the%20823%20error%20reported%20but%20this%20error%20could%20not%20be%20repaired%20from%20the%20secondary%20replica%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EDetected%20823%20in%203%20generation(30s)%3C%2FLI%3E%0A%3CLI%3EWSFC%20got%20the%20error%20state%20from%20the%20AG%20controller%2C%20restarted%20the%20AG%20resource.%26nbsp%3B%20%E2%80%93DB%20level%20error%20won%E2%80%99t%20prevent%20AG%20resource%20restart%2C%20the%20restart%20always%20works%20fine.%3C%2FLI%3E%0A%3CLI%3EThe%20failure%20count%20%2B1%2C%20the%20restart%20count%2B1%3C%2FLI%3E%0A%3CLI%3EIf%20continue%20detect%20823%20again%E2%80%94%26gt%3BAG%20offline.%20No%20failover%20because%20it%20reach%20to%26nbsp%3B%20%E2%80%9Cmax%20failure%20in%20the%20specified%20Period%E2%80%9D%20%3D1.%20no%20more%20action%20took.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERecommend%20setting%20%3A%20%E2%80%9Cmax%20failure%20in%20the%20specified%20Period%E2%80%9D%20%26gt%3B%3D%E2%80%9Cmax%20restarts%20in%20the%20specified%20Period%2B1%20at%20least.%20Then%20all%20restart%20attempt%20finished%20but%20the%20issue%20still%20is%20detected%2C%20next%20time%20failover%20will%20trigger.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1583525%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WeChat%20Image_20200106134830.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211977i31F702B509BBD025%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22WeChat%20Image_20200106134830.jpg%22%20alt%3D%22WeChat%20Image_20200106134830.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1583525%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHigh%20Availability%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esql%202016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esql%202017%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQL%202019%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

The database level health detection failover option introduced on this article

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/sql-server-always-o...

 

In addition to the existing checks, the new implementation has the following additional checks.

  1. The new implementation stores and uses a historical snapshot of the database state information to decide if the AG needs to be marked in error state or not. The health check routine caches the database state and associated error information, for the last three executions, which is then compared with the state information from the current execution of the health detection routine. If the same error condition (for the below mentioned error codes) exists in the four consecutive runs of the health detection routine, a failover is initiated. So for example if during the first run, let's say at 22:00:00 there is an error 823, and the same error conditions exists at the subsequent runs at 22:00:10, 22:00:20 and 22:00:30 then the AG is marked in an error state and the control is passed to the cluster. This implementation is intended to provide safeguards against transient errors and issues which can be fixed by the auto page repair capabilities of the availability groups.
  2. The new implementation checks for following additional errors. Majority of these errors are indicative of a hardware issues on the server. Please note, that this is not an exhaustive list of errors which could impact the database availability. There is an outstanding item to include error 824 to this list.

Error

Cause 

Documentation

605

Page or allocation corruption. 

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-605-database-eng...

823

Checkpoint failures. 

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-823-database-eng...

829

Disk corruption. 

 

832

Hardware or memory corruption. 

 

1101

No disk space available in a filegroup. 

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-1101-database-en...

1105

No disk space available in a filegroup. 

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-1105-database-en...

5102

Missing filegroup ID requests. 

 

5180

Wrong file ID requests. 

 

5515

 

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-5515-database-en...

5534

Log corruption due to FILESTREAM operation log record. 

 

5535

FILESTREAM data container corruption. 

 

9004

 Log Corruption

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-9004-database-en...

 

If we enable this feature, to make sure AG can failover successfully, we need to change the default failover policy.

 

The default “max restarts in the specified Period =1 in 1 hour

The default “max failure in the specified Period” =1 in 6  hours

 
 
 

Based on this settings, if the 823 error reported but this error could not be repaired from the secondary replica:

 

  1. Detected 823 in 3 generation(30s)
  2. WSFC got the error state from the AG controller, restarted the AG resource.  –DB level error won’t prevent AG resource restart, the restart always works fine.
  3. The failure count +1, the restart count+1
  4. If continue detect 823 again—>AG offline. No failover because it reach to  “max failure in the specified Period” =1. no more action took.

 

Recommend setting : “max failure in the specified Period” >=“max restarts in the specified Period+1 at least. Then all restart attempt finished but the issue still is detected, next time failover will trigger.