Steps for Installing SQL Server 2019

Open up Setup.exe for SQL Server 2019. In the popup, go to “Installation” and select “New SQL Server stand-alone installation or add features to an existing installation. Tips Use system default to install. Once SQL Server is installed, then go back to change the service accounts. If the setup service accounts don’t have proper permissions,... » read more

Uninstall SQL Server 2019

The uninstaller for SQL Server is hidden under the control panel’s Add or Remove Programs. Goto “Add or Remove Programs“. Select “Microsoft SQL Server 2019” and “Uninstall”. Select “Remove” from the popup menu. Select instance to remove. Select features to remove. Select “Remove” button. Note: When uninstalling SQL Server, make sure you also uninstall the... » read more

SSMS IntelliSense Autofill Feature Not Working

Issue: SSMS IntelliSense autofill feature not working after Red Gate uninstall. Resolution: Enable IntelliSense: For all query windows, please go to Tools >> Options >> Text Editor >> Transact-SQL >> IntelliSense, and select Enable IntelliSense. For each opening query window, please go to Query >> Intellisense Enabled. Enable statement completion: please go to Tools >>... » read more

AlwaysOn Setup New User on Read Only Replica

All you need is to create the same login on the second server preserving it’s sid, and you can do this first by copying the login’s sid from sys.server_principals and then by creating the same login using with sid like this: Example: On Primary Database: On Read Only Replica Database: Sources: https://dba.stackexchange.com/questions/174946/creating-a-sql-login-and-user-on-an-alwayson-replica

Repair SQL Server Management Studio

Issue: D:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe Ssms.exe is corrupted or missing. Fix: To repair Management Studio open Control Panel, go to Programs and Features, locate SQL Server Management Studio using the scroll bar and double click on it. You can also just upgrade to a newer version of SQL Server Management Studio.... » read more

Unable to connect to SQL Server Remotely

Issue: Unable to connect to SQL Server remotely. Able to connect on the server. This is for a newly installed instance of SQL Server. Fix: Make sure “Named Pipes” and “TCP/IP” protocol is enabled. Go to SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for MSSQLSERVER Make sure Named Pipes and TCP/IP... » read more

Using Option Recompile to Increase Performance

I encountered an odd situation where appending OPTION (RECOMPILE) to my query causes it to run in half a second, while omitting it causes the query to take well over five minutes. There are times that using OPTION(RECOMPILE) makes sense. In my experience the only time this is a viable option is when you are using dynamic SQL.... » read more

Using the SQL Execution Plan for Query Performance Tuning

There are number of general signs in the SQL Execution Plan that indicate potentially bad performance spots on the query. For example, the most expensive operator that has the highest cost, related to the overall query cost, is a good starting point for the query performance troubleshooting. In addition, the fat arrows, that followed with thin ones, indicates... » read more

Current Size By Table using sp_spaceused

Note: This query is the most detailed. It breaks out the Used space to Data space and Index space. ReservedSpace = DataSpace + IndexSize + UnusedSpace Note: This run needs to be ran on specific database on the server. Sources: