Our Blogs
Best Practices for MAXDOP in SQL Server
MAXDOP (Maximum Degree of Parallelism) is a configuration option in SQL Server that controls the number of processors that can be used in parallel execution of a query. Here are some best practices for using MAXDOP in SQL Server: Set MAXDOP based on the number of...
Best Practices for Managing Duplicate data in SQL Server
There are several problems that can occur when dealing with duplicate data in SQL Server: Data integrity issues: Duplicate data can lead to inaccuracies and inconsistencies in your data. For example, if a customer's information is duplicated, it can lead to multiple...
Best Practices for handling data anomaly in SQL Server
Data anomaly refers to the inconsistencies and errors that can occur in a database. These anomalies can be caused by a variety of factors, such as human error, software bugs, or system failures. There are several types of data anomalies, such as: Insertion anomaly: It...
Avoiding Cursors in SQL Server
Cursors in SQL Server allows you to traverse through the rows of a result set one row at a time. It is essentially a pointer that points to a specific row in a result set. Cursors are used to perform operations on a row-by-row basis, such as updating or deleting...
What are the issues with the Excessive use of system DMVs in SQL Server?
Excessive use of system Dynamic Management Views (DMVs) in SQL Server can lead to various issues. Firstly, querying DMVs can be resource-intensive, causing contention on the server, and generating a lot of data, leading to increased disk space usage and server...
How to change the data type of a column in a table
To modify the data type of a column: Please note: Whenever making a change to a table structure there is a chance that change may result in data corruption if not done correctly, which is why it is would advisable to take a backup/copy of the table on which you intend...
Difference between the database management system and SQL
Difference between the database management system and SQL What is a management system (DBMS): DBMS could be a group of programs used for managing information and at the same time it supports different kinds of users to build, manage, retrieve, update and store data....
What is XP_DIRTREE? What are the alternatives to XP_Dirtree
This extended and undocumented stored procedure can be used to list all folders and subfolders (recursively) from a given directory. XP_DIRTREE has three parameters: Directory - This is the directory you pass when you call the stored procedure; for...
Find missing indexes and improve query performance
Find Missing Indexes before going into production Find missing indexes the right way! First of all, finding a missing index is not a rocket science. Always find and create missing indexes before you deploy the code to the production environment. DBA's and engineers...
What are users executing from SSMS
What are users executing using SSMS? During a customer review meeting, one of the DBA asked if there’s a quick way to find out What are users executing using SSMS. Though this information can easily be obtained from SP_Who2 system stored procedure, the DBA wanted to...
Cannot generate SSPI Context in SQL Server
Cannot Generate SSPI Context is a generic connectivity error you may encounter while working with SQL Server. One of our customer had a new installation of SQL Server and ran in to this error. After hours of head scratching, the customer emailed us with the error...
SQL Server Developer Edition Free Download
Get a copy of SQL Server 2017 Developer Edition SQL Server developer edition is now free! Finally, Microsoft has made it easy for companies to develop and test SQL Server 2017 by making the developer edition of SQL Server completely free. This is certainly helpful for...
SP_What is smarter than SP_Who2
SP_What is smarter than SP_Who2! We’ve seen many DBAs scratch their head to find out who is running what in SQL Server. When a user complains about the database performance issue, the first thing DBAs do is run SP_Who or SP_Who2 to see what may be happening in SQL...
SQL Agent Job Failure Permanent Fix
Many production DBA’s have asked if there’s a way to find out how many times a job has failed in the last few months. This information can easily be obtained and can be extremely helpful to identify and permanently fix SQL Agent job failures.
Optimize for Ad Hoc Workload in SQL Server
By default, when a query is executed in SQL Server, it compiles and generates an execution plan and stores it in the plan cache. If this is a one-off or ad-hoc query that will never be run again, then the newly generated plan is wasted and its space that is being used in the plan cache is also wasted. This means the buffer pool now contains compiled plan of queries that will never be executed.
How to rebuild indexes in SQL Server
Rebuilding indexes in SQL Server is an essential maintenance task that helps optimize database performance and improve query execution times. Indexes play a crucial role in speeding up data retrieval by providing quick access paths to rows in a table. However, over...
Data and Log File Performance Using Instant File Initialization
Ever wondered why SQL Server takes long time to: Create a database Expand data files for additional growth Automatic data file growth due to auto-grow settings Restoring a database, etc. Today we will be looking into a powerful and yet not very popular feature that...