Policy Based Management


A lot of teams set up naming standards or other conventions that they like to use in their code or with their database configurations. SQL Server has a policy-based management feature that will allow a DBA to set policies to use to evaluate code and/or configuration and catch any exceptions to the defined rules.
In my example, I wanted to set up a policy to find tables that have the prefix ‘tbl’. You could create a script to find these exceptions, but policy-based management gives a way to store this definition and run it for all databases.
SQL Server used the term facet for a database object, in this case a user defined table. The policy evaluates a condition(which is the rule we want to create to not allow the tbl table prefix) against a facet property, in this case the table Name.
Usually, I would prefer to use T-SQL…

View original post 417 more words