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,568 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,012 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

808 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,426 reads

Blogs

What happens when we drop a column on a SQL Server table? Where's my space?

By

This article was initially posted on SQLServerCentral @ 2024-04-26. Short answer: The column is marked...

Why the masters and what lies ahead

By

I recently graduated with a Master’s in Strategic Communication from the University of Delaware....

Copilot Reminded Me How To Find a File Handle

By

Recently I was trying to delete a folder and kept getting the “something is...

Read the latest Blogs

Forums

How to change password

By Sezam

How can I change login password of this website? I don't see option under...

sysmail_event_log last_mod_user has a disabled login

By webrunner

Hello experts, We routinely disable sa after a SQL install. However, while troubleshooting a...

LinkedServer error

By Yousaf Khan

I getting the bellow error when runing query on linkedserver from another server after...

Visit the forum

Question of the Day

Automated Azure SQL VM Patching

There is an Automated Patching service for VMs running SQL Server in the Azure Cloud. This uses the SQL Server IaaS Agent Extension to work with PowerShell. What types of patches are installed with this service? Note: All updates are marked with tags, such as Important, Critical, or something else

See possible answers