Lock and Connection Management

Technical Article

SQLPing.vbs

  • Script

Troubleshooting intermitten connectivity issues can be difficult. One approach is to repeatedly test connecting to SQL Server outside of an existing application in order to verify if a server-wide intermitten issue is occurring. This script is used to test remote connectivity to a SQL Server. The script loops in one minute intervals (adjust as needed). […]

You rated this post out of 5. Change rating

2006-09-04 (first published: )

1,426 reads

Technical Article

sp_what

  • Script

This is a replacement for SP_who and modification of sp_who2. It will always list only active, nonsystem processes, and will list the number of seconds a transaction has been running for. Some transactions do not report a last batch time, so I forced a large value to display so you can see any issue with […]

5 (1)

You rated this post out of 5. Change rating

2006-10-02 (first published: )

2,282 reads

Technical Article

To Identify blocks if using Solomon IV

  • Script

Our business accounting software is Microsoft Business Solutions Solomon IV.which is now being called Dynamics Solomon. You will see specific refernces to this software in this code. I originally developed this to gain faster view of issues we were having with Solomon. This procedure analyzes system tables and looks for blocks. This isfaster than using […]

You rated this post out of 5. Change rating

2005-11-03 (first published: )

403 reads

Technical Article

Save results DBCC SQLPERF(UMSSTATS) in a table

  • Script

Examining the output of DBCC SQLPERF(UMSSTATS) helps in determining a CPU bottleneck. The output of the command is not handy for further investigation (from a table).This procedure performs a transformation of the results, so it is easy to query and store in a database.

You rated this post out of 5. Change rating

2005-11-04 (first published: )

1,949 reads

Technical Article

Blocked Process script for deadlock correction

  • Script

This script was created to find an application problem that was causing SQL Server blocked processes. The BlockedProcess table is created to log both the blocker and blocked processes. The sp_BlockedProcess stored procedure is created to handle the situation by: inserting all processes affected by the blocking, notifying the blocking application user, emailing the admins […]

5 (2)

You rated this post out of 5. Change rating

2005-12-01 (first published: )

4,179 reads

Technical Article

Extract data from sp_who for specific database

  • Script

sp_who (and sp_who2) work great for a quick view of what's going on in the system, and can be filtered by user, but there's no way to filter by database. This quick stored procedure provides data on which users are accessing a specific database.

You rated this post out of 5. Change rating

2004-09-13

967 reads

Technical Article

Kill all SPIDs with a certain user ID

  • Script

This script is used to disconnect all connections by a particular individual to a server. I use it when I have to disconnect somebody and they have too many processes to do it by hand. Normally, you can just connect the offending process, but if there are multiple processes that are causing a problem , […]

You rated this post out of 5. Change rating

2004-03-08

2,629 reads

Technical Article

blocked  and blocker  spid and details

  • Script

2 steps:step 1 => create   a table in master database called BlockCheckstep 2 =>  create the stored procedure in master  called  BLOCK_CHECK @database_name varchar(20)What SP  does:-    it gets the  spid that is blocked  + info about it (like what it does  at the moment  it is blocked)-    it gets the spid  that  acts as a […]

4 (1)

You rated this post out of 5. Change rating

2003-06-05

722 reads

Technical Article

Script to kill the top blocker and report what it was doing.

  • Script

This script identifies the blocking locks at the top of the blocking chain and kills them. Specifically, it reports what the top blocking spids are doing, kills them, waits three seconds and then reports on current blocking status.  If you have a situation where single connections are causing a huge blocking chain and you want […]

4.75 (4)

You rated this post out of 5. Change rating

2003-05-12

4,333 reads

Blogs

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Read the latest Blogs

Forums

Writer methods in PowerQuery (LOL)

By pietlinden

I'm using PowerQuery in Excel on my desktop. (Yeah, I know you can do...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers