One of the common problems with when diagnosing what appears to be a slow scenario where there may be blocking involved is determining what is blocking on SQL Server. Here is a query that I like to use. If there is no blocking occurring then this query will return nothing.   This script works on SQL Server 2008, 2008R2, 2012, …

Finding Blocking Queries Read more »

Being day six of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKIDENT. Description: DBCC CHECKIDENT is used for check on the current value in the identity column for a table.  It also reports on the largest value in that column. DBCC CheckIdent can also be used to update or set the next identity value on …

DBCC CheckIdent Read more »

When creating a table you can specify IDENTITY with the following syntax: For example The IDENTITY property is valid for data types of the integer data type category, except for the bit data type, or decimal data type.  So how many rows can you insert into that table?  It depends on the data type used. BIGINT maximum value is 9,223,372,036,854,775,807 …

Are you wasting half the capacity of IDENTITY? Read more »