You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$Skip= ($__dbcconfig|Where-Object Name -EQ'skip.database.pageverify').Value
281
+
Context "Testing page verify on $psitem" {
282
+
283
+
if($psitem.MajorVersion-eq8) {
284
+
It "Database Page verify is not available on SQL 2000 on <_.SqlInstance>" {
285
+
$true| Should -BeTrue
286
+
}
287
+
} elseif ($psitem.MajorVersion-eq9) {
288
+
It "Database <_.Name> should have page verify set to <_.ConfigValues.pageverify> on <_.SqlInstance>"-Skip:$skip-ForEach $psitem.Databases.Where{ if ($Database) { $_.Name-in$Database } else { $psitem.ConfigValues.pageverifyexclude-notcontains$psitem.Name } } {
289
+
if($psitem.Name-ne'tempdb') {
290
+
$psitem.PageVerify| Should -Be $psitem.ConfigValues.PageVerify-Because "Page verify helps SQL Server to detect corruption"
291
+
} else {
292
+
$true| Should -BeTrue
293
+
}
294
+
}
295
+
} else {
296
+
It "Database <_.Name> should have page verify set to <_.ConfigValues.pageverify> on <_.SqlInstance>"-Skip:$skip-ForEach $psitem.Databases.Where{ if ($Database) { $_.Name-in$Database } else { $psitem.ConfigValues.pageverifyexclude-notcontains$psitem.Name-and$_.Name-ne'tempdb'} } {
297
+
$psitem.PageVerify| Should -Be $psitem.ConfigValues.PageVerify-Because "Page verify helps SQL Server to detect corruption."
298
+
}
299
+
#tempdb handled like v4
300
+
It "Database Page verify is not available on tempdb on SQL 2005 on <_.SqlInstance>"-Skip:$skip-ForEach $psitem.Databases.Where{ $_.Name-eq'tempdb' } {
301
+
$psitem.PageVerify| Should -Be $psitem.ConfigValues.PageVerify-Because "Page verify helps SQL Server to detect corruption."
0 commit comments