I have created a policy in SQL Server 2008 R2 and need it to be evaluated on demand - whenever a new database is created.

In order to achieve that, I created a DDL trigger at server level, which will be executed whenever a new database is created. I was planning to evaluate my policy inside the body of this DDL trigger but I have been stopped in there! All examples that I have seen so far, demonstrate how to evaluate a policy using SQL Server Management Studio only. Is it not possible to do that very same thing in T-SQL?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.