Microsoft had released an amazing tool that would analyze your SQL installation and produce report detailing some of the settings that don’t meet Microsoft recommendation or would say Best Practice. I must say this tool is quite useful and could help you as DBA administrator identify some loopholes and resolve but note that not all settings may be applicable in your environment.
Functions: The Microsoft SQL Server 2008 R2 Best Practices Analyzer (BPA) tool performs the following functions:
- Gathers information about a Server and a Microsoft SQL Server 2008 or 2008 R2 instance installed on that Server
- Determines if the configurations are set according to the recommended best practices
- Reports on all configurations, indicating settings that differ from recommendations
- Indicates potential problems in the installed instance of SQL Server
- Recommends solutions to potential problems
Requirement:
- PowerShell V2.0 (Already built into the Operating System)
- Microsoft Baseline Configuration Analyzer V2.0 (Download and install first)
Setup Guide:
1. Install Microsoft Baseline Configuration Analyzer V2.0
- Download the Microsoft Baseline Configuration Analyzer V2.0 from Microsoft
- Run the MBCA_Setup64.msi file depending on your OS type (64bit or 32bit version) -> click Next
Image may be NSFW.
Clik here to view.
- Accept the End-User License Agreement -> click Next
Image may be NSFW.
Clik here to view.
- Accept Default install path -> click Next
Image may be NSFW.
Clik here to view.
- Click Install to begin the installation
Image may be NSFW.
Clik here to view.
- Click Finish upon completion
Image may be NSFW.
Clik here to view.
2. Install SQL Server 2008 R2 BPA
- Download the SQL Server 2008 R2 BPA from Microsoft
- Run the SQL Server 2008 R2 BPA msi file -> click Next
Image may be NSFW.
Clik here to view.
- Accept the End-User License Agreement -> click Next
Image may be NSFW.
Clik here to view.
- On Systems Configuration Changes page -> Take note of the command to enable Remoting use on both SQL servers using Powershell -> Tick the check box -> click Next
Image may be NSFW.
Clik here to view.
- Click Install to begin the installation
Image may be NSFW.
Clik here to view.
- Click Finish when installation is completed.
Image may be NSFW.
Clik here to view.
Enable Remoting: To enable remoting on both SQL servers:
- Click on Start -> All Programs -> Accessories -> Windows Powershell -> click Windows Powershell
- Type the command “Set-WSManQuickConfig” -> Press Enter
Image may be NSFW.
Clik here to view.
- You will be asked “Do you want to enable remote management through the WinRM service on this computer?” -> type Y and press Enter
Image may be NSFW.
Clik here to view.
- The system will perform all the tasks as listed out in this article if not already done -> close the Powershell screen
Run the BPA Analyzer: Before you run the BPA Analyzer ensure the account you login with to the SQL server is added to SQL login and granted ‘sysadmin’ right.
- Click Start -> All Programs -> click Microsoft Baseline Configuration Analyzer
Image may be NSFW.
Clik here to view.
- Notice top right (Connected to: Local), the SQL BPA will scan SQL installed locally on the server -> Select SQL Server 2008 R2 BPA from the drop-down list -> click Start Scan
Image may be NSFW.
Clik here to view.
- On Enter Parameters section -> Select the SQL components you want to scan -> Leave the SQL instance name blank if you installed SQL with default instance name -> click Start Scan
Image may be NSFW.
Clik here to view.
- When BPA scan is completed -> Review the Errors/Warning and ensure the issues are resolved based on your environment.