Skip to content

SQLMac

Database & Code

  • Home
  • DBA
    • Database
    • SQL Resources collection
  • Dev
    • Powershell
    • SQL Code
  • Technology

Tag: code

Disable login and kill user SPIDs

Posted on April 25, 2017January 21, 2021 by Garland MacNeill

Recently came across a situation where reporting logins were interfering with nightly jobs due to blocking. After a number of attempts of trying to resolve the blocking, it was decided that a stored procedure that disabled the login and killed the user sessions was the most pragmatic solution. This is the code I came up with to resolve the issue.

Read More
SQL Code code, tsql Leave a comment

Search

Recent Posts

  • Migrating my Blog
  • Changes and Evolution
  • Error: SQL Replication – Remote Server does not exist, or not designated
  • TGIF: It’s been one of those weeks
  • Be Wary of Windows Firewall

Archives

Tags

#NewSQLBlogger (1) #tsql2sday (8) availability group (2) aws (1) backups (2) blog (1) career (12) cloud (2) code (1) DBA (6) development (1) devops (2) firewall (1) Goals (2) learning (4) linux (1) logins (1) management (1) microsoft (2) office environment (2) personal tech (1) postgres (2) powershell (2) replication (1) security (1) sql code (1) sql development (1) SQLsaturday (3) SQL Saturday (1) SQL Server (3) SSMS (2) tempdb (1) tools (5) training (4) tsql (2) wfh (1)