|
@@ -1,10 +1,25 @@
|
|
|
-**BPCheck** - SQL Best Practices and Performance checks
|
|
|
+# BPCheck - SQL Best Practices and Performance checks
|
|
|
|
|
|
-**Purpose:** Checks SQL Server in scope for some of most common skewed Best Practices and performance issues. Valid from SQL Server 2005 onwards. By default all databases in the SQL Server instance are eligible for the several database specific checks, and you may use the optional parameter to narrow these checks to specific databases.
|
|
|
+## Purpose:
|
|
|
+Checks SQL Server in scope for some of most common skewed Best Practices and performance issues.
|
|
|
+Valid from SQL Server 2005 onwards. By default all databases in the SQL Server instance are eligible for the several database specific checks, and you may use the optional parameter to narrow these checks to specific databases.
|
|
|
+All checks marked with an asterisk can be disabled by @ptocheck parameter. Check the PARAMETERS.md file or script header for all usage parameters.
|
|
|
|
|
|
-All checks marked with * can be disabled by @ptocheck parameter. Check the PARAMETERS.md file or script header for all usage parameters.
|
|
|
+## Parameters for executing BPCheck
|
|
|
+- **@duration** Sets the number of seconds between data collection points regarding perf counters, waits and latches. Duration must be between 10s and 255s (4m 15s), with a default of 90s.
|
|
|
+- **@ptochecks** Set to OFF if you want to skip more performance tuning and optimization oriented checks. Uncomment **@custompath** below and set the custom desired path for .ps1 files. If not, default location for .ps1 files is the Log folder.
|
|
|
+- **@allow_xpcmdshell** Set to OFF if you want to skip checks that are dependant on xp_cmdshell. Note that original server setting for xp_cmdshell would be left unchanged if tests were allowed.
|
|
|
+- **@spn_check** Set to OFF if you want to skip SPN checks.
|
|
|
+- **@diskfrag** Set to ON if you want to check for disk physical fragmentation. Can take some time in large disks. Requires elevated privileges.
|
|
|
+- **@ixfrag** Set to ON if you want to check for index fragmentation. Can take some time to collect data depending on number of databases and indexes, as well as the scan mode chosen in @ixfragscanmode.
|
|
|
+- **@ixfragscanmode** Set to the scanning mode you prefer. More detail on scanning modes available at http://msdn.microsoft.com/en-us/library/ms188917.aspx
|
|
|
+- **@logdetail** Set to OFF if you want to get just the summary info on issues in the Errorlog, rather than the full detail.
|
|
|
+- **@bpool_consumer** Set to OFF if you want to list what are the Buffer Pool Consumers from Buffer Descriptors. Mind that it may take some time in servers with large caches.
|
|
|
+- **@gen_scripts** Set to ON if you want to generate index related scripts. These include drops for Duplicate, Redundant, Hypothetical and Rarely Used indexes, as well as creation statements for FK and Missing Indexes.
|
|
|
+- **@dbScope** Set to the appropriate list of database IDs if there's a need to have a specific scope for database specific checks. Valid input should be numeric value(s) between single quotes, as follows: '1,6,15,123'. Leave NULL for all databases.
|
|
|
|
|
|
-Contains the following information:
|
|
|
+## Detail on output sections:
|
|
|
+Contains the following informational sections:
|
|
|
- Uptime
|
|
|
- Windows Version and Architecture
|
|
|
- HA Information
|
|
@@ -23,6 +38,7 @@ And performs the following checks:
|
|
|
- Processor
|
|
|
- Number of available Processors for this instance vs. MaxDOP setting
|
|
|
- Processor Affinity in NUMA architecture
|
|
|
+ - HP Logical Processor issue (https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04650594)
|
|
|
- Additional Processor information
|
|
|
- Memory
|
|
|
- Server Memory
|
|
@@ -108,7 +124,7 @@ And performs the following checks:
|
|
|
- Errorlog based checks
|
|
|
- System health checks
|
|
|
|
|
|
-**IMPORTANT pre-requisites:**
|
|
|
+## IMPORTANT pre-requisites:
|
|
|
- Only a sysadmin/local host admin will be able to perform all checks.
|
|
|
- If you want to perform all checks under non-sysadmin credentials, then that login must be:
|
|
|
- Member of serveradmin server role or have the ALTER SETTINGS server permission;
|