microsoft / azure-sql-tips

A T-SQL script for improving database configuration and design in Azure SQL DB.
https://aka.ms/sqldbtips
MIT License
144 stars 51 forks source link

Split calls for database and system level views #33

Closed wsmelton closed 3 years ago

wsmelton commented 3 years ago

In many environments, an admin is not an admin of the whole Azure SQL server and only the DB; or a developer wants to validate the database level items only.

The script as-is fails if any system view is not accessible without allowing us to run checks against a database. Splitting these into two catch blocks and simply show the checks that failed due to permissions will still offer users the ability to see improvements/things to fix instead of not knowing any of them.

dimitri-furman commented 3 years ago

Duplicate of #34