Lock and Connection Management

Technical Article

Show Blocking and Wait time

  • Script

When executed against a database in which blocking occur, below script will report lockType, Object waited for and current Wait times. The script requires access to master..systables. The script queries syslockInfo (as does sp_lock), but further joins sysprocesses with an interpretation of waitresource matching SQL Server 7.0 and SQL Server 2000.

You rated this post out of 5. Change rating

2002-01-14

2,574 reads

Technical Article

Report Locking on Specific Database

  • Script

This Script reports locking on a particular database either to the console or to a database table. It also allows filtering based on a minimum locking level (say Page or Table and higher). Included is the CREATE TABLE statement to build the reporting table. This table can reside in any database but needs to be […]

You rated this post out of 5. Change rating

2002-01-06

1,017 reads

Technical Article

sp_dba_checkblocked fix for sp_NotifyBlock

  • Script

Problems with error 512 more than 1 result returned due to the operator outside of the query. Found this when tested with multiple blocks going on at once. It worked fine when there was only 1 block. Depending on the type of server there can be a "whole lot of blocking going on "Replaced with […]

You rated this post out of 5. Change rating

2002-01-01

812 reads

Technical Article

SQL Server Current Activity SuperCheck

  • Script

This gives a quick check of the current activity on a SQL Server. I developed this after getting continually frustrated with "Current Activity" in SQL/EM getting blocked by processes when I needed to see blocking issues on the server. It has been immensely valuable to me in quickly identifying production-stopping issues on the database. It […]

4.2 (5)

You rated this post out of 5. Change rating

2001-08-13

4,875 reads

Technical Article

Kill All Users in A Given Database

  • Script

This script will kill all users in a given database. Before disconnecting, it can optionally send the user a NET SEND Message giving them a warning to disconnect. To run, simply call it like usp_killusers 'dbname'. Make sure the @dbname parameter is not the master database.

4.17 (6)

You rated this post out of 5. Change rating

2001-08-08

4,437 reads

Blogs

A New Word: Incidental Contact High

By

incidental contact high – n. an innocuous touch by someone just doing their job...

Azure PostgreSQL Flexible Server and Entra Groups

By

My company is moving from an Azure PostgreSQL single server to a flexible server....

Take the 2025 State of Database Landscape Survey

By

The survey is out now and you can share your experiences for a chance...

Read the latest Blogs

Forums

GIT Configuration and Automated Release for Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item GIT Configuration and Automated Release...

How to Add a New Shared Disk to a WSFC as a SQL Resource

By muhkam

Comments posted to this topic are about the item How to Add a New...

Knowing What You Don't Know

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Knowing What You Don't Know

Visit the forum

Question of the Day

Am I on Synapse?

How can I tell from T-SQL if I'm connected to SQL Server or Synapse Analyics?

See possible answers