![]() |
|
Identify and resolve SQL Server problems before they happen

|
|
By: Svetlana Golovko | Read Comments (3) | Related Tips: More > Policy Based Management |
Brady Upton explains in his tip how to create a SharePoint KPI that will display SQL Server versions. In this tip we will show how to check SQL Server versions on multiple instances using Policy Based Management.
To get a list of the different versions of SQL Server, we can use SqlSecurity.com to find SQL Server build numbers for the latest Service Packs. Then we can create a policy that compares current SQL Servers' versions with the latest Service Pack build. To evaluate the policy against all SQL Servers you can use Central Management Server or Registered Servers in SQL Server Management Studio (SSMS). In this tip we will evaluate the created policy against SQL Server 2005, SQL Server 2008 and SQL Server 2012.
For more info on Policy Based Management please review this tip: Using Policy Based Management in SQL Server 2008.
For this policy I am going to check the following versions and builds:
We will create two conditions. One to use in the policy for server restriction (SQL Server 2005 or higher) and another one for actually checking the version and comparing it to the latest Service Pack build number.
Create the condition that will be used for the server restriction:


Create the condition that will be used in the policy to check the SQL Server version:




You can use the Registered Servers in SSMS to evaluate the policy. Refer to this tip for more information.
You can also evaluate the policy using the Central Management Server. Refer to my previous tip for the details.
Review the results after you evaluated the policy:

Click on the "View..." link for the failed server under "Details" column:

| Monday, February 04, 2013 - 6:03:13 PM - David | Read The Tip |
|
Svetlana,
I enjoyed the article and worked through setting it up. What would be nice to see is being able to evaluate SQL 2008 and SQL 2008 R2 by themseleves as they are at different levels. Can you check the level using '10.00' and '10.50'. That would ge great.
David |
|
| Tuesday, February 05, 2013 - 10:45:15 AM - Svetlana Golovko | Read The Tip |
|
Hi David, This is a good point. Thank you! It's pretty easy to add another version. To add SQL Server 2008 SP3 to the check you can change the expression to this: ExecuteSql('Numeric', 'SELECT CASE |
|
| Tuesday, March 19, 2013 - 6:04:25 PM - Sumon Basu | Read The Tip |
|
Svetlana, Thanks for your post. I tried to implement the policy in my environment, where maximum of the instances are named. In some of the servers I am getting an error "cannot configure property..... [ExecuteSql statement]..... because the result is not deterministic". I tried to fix the issue, but was unable to do the same. Can you please help. Thanks & Regards, Sumon |
|
|
privacy | disclaimer | copyright | advertise | about authors | contribute | feedback | giveaways | user groups Some names and products listed are the registered trademarks of their respective owners. Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com |