Category Archives: Tips

Starting SSMS with a specific connection and script file

Have you ever wanted SSMS to start and automatically and establish a connection to your DBA \ hub server and have your daily routine queries already open ready to run?

Good news, that is totally possible. SSMS actually uses the SSMS.exe in the background which has multiple options such as connecting to a specific SQL Server instance and opening a file. All these options are accessible through a few very simple command line parameters, if you are familiar with SQLCmd these parameters will like be really similar to you.

Continue reading

MAXDOP Calculator

Every time I conduct a SQL Server health check, it’s pretty common for me to find wrong configurations at instance level. But one of the most common mistakes I see on the wild, is SQL instances having the “max degree of parallelism” (MAXDOP) set to “1” (single core) , probably this behavior is related to a misconception of how parallelism works or because some DBAs thinks this parameter reduces the “CXPACKET” wait types, who knows …

In order configure MAXDOP properly, DBA’s should read and understand what Microsoft’s has as best practice guideline in the KB# 2806535. This article has a table with the explanation on how to calculate the right value for this configuration: Continue reading

Cleaning up Query Store data after database restore

Query Store is a very powerful tool for performance tuning, if you are not using it already you should!! It will save you a lot of time and effort because it makes the performance troubleshooting easy for DBA’s. It helps you to quickly find performance differences caused by query plan change or a query regression after an upgrade.

One of the caveats of using this tool is that uses space from the PRIMARY file group when enabled, that means if the database is restored to another environment the Query Store data will be restored as well making your database restored version a little bit bigger and containing information that is probably not relevant for a development environment (unless you are doing a troubleshooting). Continue reading