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 <_.Name>" {
282
+
283
+
# handle differently depending on major version - not available at all in SQL 2000. 2005 not available on tempdb.
284
+
if($psitem.MajorVersion-eq8) {
285
+
It "Database Page verify is not available on SQL 2000 on <_.SqlInstance>" {
286
+
$true| Should -BeTrue
287
+
}
288
+
} elseif ($psitem.MajorVersion-eq9) {
289
+
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 } } {
290
+
if($psitem.Name-ne'tempdb') {
291
+
$psitem.PageVerify| Should -Be $psitem.ConfigValues.PageVerify-Because "Page verify helps SQL Server to detect corruption"
292
+
} else {
293
+
$true| Should -BeTrue
294
+
}
295
+
}
296
+
} else {
297
+
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'} } {
298
+
$psitem.PageVerify| Should -Be $psitem.ConfigValues.PageVerify-Because "Page verify helps SQL Server to detect corruption."
299
+
}
300
+
#tempdb handled like v4
301
+
It "Database Page verify is not available on tempdb on SQL 2005 on <_.SqlInstance>"-Skip:$skip-ForEach $psitem.Databases.Where{ $_.Name-eq'tempdb' } {
302
+
$psitem.PageVerify| Should -Be $psitem.ConfigValues.PageVerify-Because "Page verify helps SQL Server to detect corruption."
0 commit comments