Search notes:

SQL Server: kill statement

The kill statement can be used to terminate a process:
kill session_id
kill UOW
kill session_id with statusonly
kill UOW        with statusonly
The session id can be found in the column spid of the view sys.sysprocesses.

kill SPID with statusonly

Sometimes, killing a session takes longer than expected, typically because the instance needs to roll back a session's transactions.
In this case, kill N with statusonly can be used to get an estimation on how far the rolling back has proceeded:
kill 61 with statusonly
 
SPID 61: transaction rollback in progress. Estimated rollback completion: 37%. Estimated time remaining: 195 seconds.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740453770, '18.119.213.129', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/T-SQL/statements/kill(49): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78