Policy Management & Tips

Posted on Updated on


It is interesting how implement code standards for stored procedures in Sql Server, stored procedures system are prefixed with “sp_”, for our user stored procedures, let the prefix of “usp_”, this is done with Policy Management (see SSMS – the object explorer, root).

PM2

Right-click on Policy Management and select New Condition, Type a name and condition as well as the body of your condition, we have decided to select the Name filter expression LIKE (‘usp_%’).

PM0

The next step is to create a policy associated with this codition, right-click Policy Management and select New Policy, select the Check Condition list, the condition created previously, the evaluation mode must be set to “On change: prevent prevention “, the default mode is” on Demand “and policies can not be enabled in this mode, for the Target, make sure you select all the databases and all stored procedures.

PM

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s