Databases Reference
In-Depth Information
How it works...
There are many different database properties available to check in the Create New Condition
dialog box, but we have checked only two of them for demonstration. Auto Shrink is a
dangerous property; leaving it as True has very few pros but so many cons that we strongly
advise you to leave it set to False. Whenever a condition is evaluated, it will give us a result
as to whether the AutoShrink property of the database is True or False.
The Status property of a database is also one of the important properties; it should be
Normal. So we are supposed to check the condition !=Normal while also showing the use
of the two conditions we used earlier—=offline and =EmergencyMode. If any of these two
properties shows TRUE, we can take immediate action, but in our case it will show False as
our database condition is Normal.
The red-cross symbol you observed in the Result field conveys that the policy doesn't meet
the required value. For example, we set the value Offline for @Status, but at the moment the
value is Normal, and hence it shows the red-cross mark.
AutoShrink should generally be off, so if it becomes TRUE, PBM should
notify the concerned person. That was the reason we selected FALSE for
the AutoShrink property.
There's more...
Administering PBM requires membership in the PolicyAdministratorRole role in the msdb
database, as policies are stored in this database. This role has complete control over all
policies on the system. This control includes creating and editing policies and conditions,
and enabling and disabling policies.
You can find the available policy in the SQL Server instance by using the following T-SQL script:
Select name,date_created ,facet,obj_name from msdb.dbo.syspolicy_
conditions order by date_created desc
Here is a screenshot of the results I have received in my instance; you may get more or
fewer rows:
 
Search WWH ::




Custom Search