Quantcast
Channel: Questions in topic: "database-objects"
Viewing all articles
Browse latest Browse all 22

SQL Policy to enforce object naming standards across User Databases

$
0
0
Apologies in advance if this is a stupid question as I am new to SQL Server Policy Management but here goes: - I am trying to set up a policy that will enforce object naming standards across all user databases however I can’t assign my condition against targets during the policy creation stage! I have followed several posts to get me started and had no issues setting a policy up against an individual database however when I try to amend my database condition I receive an error! 1) Condition UserDatabases a. Field - @Name b. Operator – Not In c. Value – Array(‘master’, ‘msdb’, ‘model’) 2) Condition StoredProcNamingStandard a. Field - @Name b. Operator – Like c. Value – ‘usp_%’ 3) Policy a. Check Condition – StoredProcNamingStandard i. Against Targets – 1. Every StoredProcedure 2. UserDatabase – Database (this is my condition I want to use for user db’s only) Now this is where I have an issue my condition is not available in the drop down for the target Database and even if I try to create a new one from here it does not allow me to assign it, obviously I am doing something wrong so any help/guidance would be greatly appreciated. Thankyou.

Viewing all articles
Browse latest Browse all 22

Trending Articles