dataplat / dbachecks

✔ SQL Server Environmental Validation
https://dbachecks.readthedocs.io/en/latest/
MIT License
460 stars 141 forks source link

Column Identity Usage test inconsistencies #979

Open gpollokoff opened 1 year ago

gpollokoff commented 1 year ago

Issue

This is a bug or unexpected behaviour

Bug Report

Test for "Column Identity Usage" has 2 inconsistencies.

  1. If version is less then 10, it executes Assert-DatabaseDuplicateIndex which has no bearing on Identity column usage.
  2. The test compares the policy.identity.usagepercent value which defaults to 90 but the Test-DbaIdentityUsage function returns PercentUsed in decimal (e.g. 0.87 for 87%). Without changing the config value, the test will always return true.

General Troubleshooting steps

[0.04 sec] > (Find-module dbachecks).Version -match (Get-Module dbachecks).Version.ToString() True

Version Information

Code issue is version independent