Welcome to the Policy-Based Management myths finale. Do to some great questions at SQL Saturday # 61 in DC I am going to focus on some myths that come up with Policy-based Management. Today is the final installment, you can catch the other myths below.
- Execute and apply policies against SQL Server 2000
- A policy using one of the database facets runs against all databases
- You cannot use Policy based Management with SQL Server 2008 R2 Express
You cannot use Policy-Based Management with SQL Server 2008 R2 Express
Just like the two other myths the answer is true and false. This one, really through me for a loop mainly because I don’t normally use SQL Express. With that said, if you want to store or use SSMS to create a policy while connected to SQL Express instance the answer is false. If you want to evaluate an existing SQL Express instance the answer is true.
Why can’t I create policies or store them in SQL Express 2008 R2?
When I read the following article on SQL Server 2008 R2 Express site I would think that the flexible section make it seam like you could store and create policies with that edition of SQL Server. Unfortunately, you will notice that Policy-Based Management is disabled. This isn’t too bad, lets just enable it. Oh snap………. You get the friendly error message that states, “Policy-Based Management cannot be enabled on this edition of SQL Server.”
How do I evaluate policies against SQL Express 2008 R2?
So, I cannot enable Policy-Based Management on SQL Server 2008 R2 Express edition can I still evaluate and apply changes to this instance of SQL Server? Yes, you can, once you have your policies built you can use Central Management Server to evaluate and apply changes.
Below is a screen shot of me evaluating the built-in “Last Successful Backup” policy against an instance of SQL Server 2008 R2 Express. You will see that it fails because well I don’t use Express so I don’t have the databases backed up.
Note: There will be more to come in a future blog post on setting up Central management Server and using it to execute Policy-Based Management policies.
How can I build a policy to work against SQL Express 2008 R2?
Connect to another instance of SQL Server using, Standard, Enterprise, or Developer to generate your policies via SSMS and store the policy on a central instance of SQL Server (not express) or on a file share.
- Policy-Based Management Myth Series – This is a shameless plug to the first myth in the three part series. The series covers executing Policies against SQL Server 2000, a necessary tweak to apply a policy against all user and system databases, and finally evaluating against SQL Express.
- SQL Server Policy-Based Management Blog – This is a great blog created by Microsoft with some great tips. There is quite a few good post out there like, The morning checklist, using ExecuteSQL and more.
- Pro SQL Server 2008 Policy-Based Management (Expert’s Voice in SQL Server) – This by far the best book out there on Policy-Based Management. I highly recommend you add it to your bookshelf.