Author

With Index

Usually the DB engine should automatically select the index to use based on query execution plans it builds. However, there are some pretty rare cases when you want to force the DB to use a specific index.

SET LOCK_TIMEOUT

https://learn.microsoft.com/en-us/sql/t-sql/statements/set-lock-timeout-transact-sql?view=sql-server-ver16 Specifies the number of milliseconds a statement waits for a lock to be released.

Unable to Create Always On Listener Due to Permission Issue

Error: Cluster network name resource ‘XXXX’ failed to create its associated computer object in domain ‘xxxxx’ during: Resource online. The text for the associated error code is: Cannot complete this function. Please work with your domain administrator to ensure that: The cluster identity ‘XXXX$’ has Create Computer Objects permissions. By default all computer objects are... » read more

SQL Server Edition and Always On Setup

Standard Edition only allows Always On setup in basic mode. Switch to Enterprise Edition for full Always On features. Always On Basic Mode (Standard Edition) Limitations Basic availability groups use a subset of features compared to advanced availability groups on SQL Server Enterprise Edition. Basic availability groups include the following limitations: Limit of two replicas... » read more

Install SQL Server First Responder Kit

https://www.brentozar.com/first-aid/ https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit#how-to-install-the-scripts Run Install-All-Scripts.sql in master database. Run sp_BlitzIndex.sql in individual database.

Stored procedure takes longer to run than query.

Issue: Hi I have a stored procedure and when i run it by using declare and set parameter it gives me result with in 30 seconds but if I use (exec sp_procedurename parametervalue1,parametervalue2) statement then it takes 5 minutes to execute. Resolution: If you’re running the same exact SQL as the stored procedure and the... » read more

SSRS Report Execution Log

Sources: https://learn.microsoft.com/en-us/sql/reporting-services/report-server/report-server-executionlog-and-the-executionlog3-view?view=sql-server-ver16

How to Check Case-Sensitivity in SQL Server

SQL Server is, by default, case insensitive; however, it is possible to create a case-sensitive SQL Server database and even to make specific table columns case sensitive. The way to determine if a database or database object is to check its “COLLATION” property and look for “CI” or “CS” in the result. CI = Case Insensitive... » read more

General database mail troubleshooting steps

Note: If no errors seen on the database side, it could be some problem with the outgoing STMP email server. Sources: https://learn.microsoft.com/en-us/sql/relational-databases/database-mail/database-mail-general-troubleshooting?view=sql-server-ver16