T-SQL

Learn How to use SQL Server BETWEEN Operator

SQL BETWEEN operator is used to get values between a range of data inputs. We can use SQL BETWEEN operator…

How to Change SQL Server Instance Name?

Changing SQL Server Instance name is not a routine task. Although, sometimes we get requirements to change SQL Instance name.…

Fix Error 15190: There are still remote logins for the server ‘DBSERVER’.

I got this error 15190 while renaming SQL Server Instance name. I was not able to drop the existing SQL…

How to Enable, Disable or Check SQL Server Trace Flags?

Trace flags are used to gather in-depth information about certain logs during some transactions. We use DBCC commands to enable…

New T-SQL Functions Introduced in SQL Server 2017

SQL Server 2017 is feature rich product that has been launched with multiple new features. You can read attached article…

Disk and Performance Impact of Online Index Rebuild Operation

Here, we are going to talk about disk and performance Impact of online Index rebuild operation. As we know index…

Understanding Different Types of SQL JOINs with Examples

SQL JOINs are used to retrieve set of information from two or more different tables based upon certain common values…

Difference between UNION and UNION ALL T-SQL Operators

If you want to combine output from multiple tables or queries into one result set, you can do this using…

Why is table row count showing incorrect value in sys.partitions or in DMV sys.dm_db_partition_stats

Last week, I had a requirement to check the row counts of all the tables present in a database. I…

How to Get Row Count of All Tables of a Database

Last week, I had a requirement to check the row count of all tables having a specific schema of databases.…

Create a Logon Trigger to Restrict sysadmin logins to connect to SQL Server for given Time Interval

I was struggling with unwanted modifications of SQL Server configurations by random SQL Server sysadmin logins who were part of…

How to Protect Stored Procedure Code in SQL Server?

Have you ever thought how to protect stored procedure codes deployed on your SQL Server Instance? When deploying applications to…

How to Disable AutoCommit in SQL Server?

Autocommit mode is the default transaction management mode of the SQL Server Database Engine. Every Transact-SQL statement is committed or…

How to find Total no of Traces Running on your Database Instance?

Suppose you want to find out how many traces are running on your SQL Server database instance? If you don't…

How to Move Table to Another Filegroup?

Suppose we had a database that has grown very large in size and located on the D drive that had…