Questions tagged [kill]

21 questions
9
votes
1 answer

How to terminate a suspended SQL Server transaction waiting for IO_COMPLETION?

We have a transaction that has been running for more than 5 hours. We are running out of disk space. The session has been killed but it is still waiting for IO_COMPLETION. Actually the wait_type just changed to PAGEIOLATCH_EX. How can I terminate…
Tarzan
  • 557
  • 1
  • 5
  • 17
8
votes
2 answers

Does killed session appears in Query Store?

Is there any option to see killed sessions in Query Store? I am asking, because we have an additional tool which is terminating sessions if they take more than 30 minutes to run (KILL command). I would like to check the execution plans in the Query…
adam.g
  • 465
  • 2
  • 11
8
votes
4 answers

Delete statement not responding to Kill session command

Four days ago a user ran the command below on a table with 400,000,000 rows. It's still running and the log file is increasing in size. delete from [table-name] This table does have a foreign key constraint which is not enabled for checking and I…
David Woakes
  • 183
  • 1
  • 4
6
votes
1 answer

Using TCP keepalive for terminating orphan postgres queries not working

Problem: A user of some application executes a report which involves a heavy sql query. After some minutes, the user then quits the application (or even worse, the app crashes, or the connection to the database server is lost). The query however…
5
votes
1 answer

how to kill a rogue spid that is already killed?

I have an obstinate spid that I cannot kill and it is preventing the transaction log of my tempdb to get truncated this is how I found this rogue spid: if object_id('tempdb..#OpenTranStatus','U') is not null drop table #OpenTranStatus CREATE…
Marcello Miorelli
  • 17,274
  • 53
  • 180
  • 320
5
votes
2 answers

Kill infinite loop plperl

How can I kill session with infinite looped plperl function? Both pg_terminate_backend and pg_cancel_backend had no effect. kill -1 pid did nothing as well and kill -9 pid crashed server.
4
votes
1 answer

How to stop the execution of a long running insert query?

I've executed an INSERT INTO ... SELECT as a job on my MySQL instance and then I realized that number of records that is selected by the WHERE condition is more than my patience. It's already taken 12 hours and there's no sign of the job being…
Mehran
  • 145
  • 1
  • 6
4
votes
2 answers

Queries on large database kill connection to the server, works with LIMIT

I'm trying to run queries on a large-ish database without killing the connection to the server. I'm using Postgres 12.1 on a mac with 16gb of memory, and about 40gb of free disk. The database is 78gb according to pg_database_size with the largest…
doeeehunt
  • 51
  • 1
  • 5
4
votes
3 answers

Grant permission to KILL connections (sessions) for certain databases only?

For a SQL Server on a VM/physical box (not Azure SQL database!) Is this possible to grant KILL permission, but in a way that grantee can kill connections only for certain databases ? I would not want to grant this user ability to kill any…
Aleksey Vitsko
  • 6,148
  • 5
  • 39
  • 70
3
votes
2 answers

Linux command to kill all MySQL sessions from a specific User?

How can i kill all sessions from a user in mysql using a linux command line command? I have a user that is using all on my database connections and insted of killing one by one i want to make a script to kill them all !
user_bump
  • 49
  • 1
  • 2
  • 5
3
votes
0 answers

Understanding how sys.dm_exec_requests represents queries being rolled back

I'm not sure whether this was an actual problem or just a normal situation where I needed to wait for rollback to finish. In either case, some insight would be appreciated. Background details I manage a server running SQL Server 2008 R2 SP2 that has…
James Lupolt
  • 4,278
  • 5
  • 31
  • 46
2
votes
0 answers

MariaDB: Terminate long-running clearnup process?

This is a follow up to my previous question about a long-running INSERT SELECT query that may have exceeded the max_statement_time and was Killed. It has been in the Reset for next command state for 3.5 days. I think it is rolling back changes on…
Chris Cox
  • 43
  • 6
2
votes
1 answer

Kill concurrent materialized view refresh PID

Concurrent refreshes of materialized views don't have a record in pg_stat_activity, other than the initial (~immediately completing) query to start them. Is there some other way to obtain the PID, in order to perform pg_terminate_backend(pid)?
OJFord
  • 125
  • 5
2
votes
1 answer

Process was intentionally killed - now the process is still showing in "show processlist "

We had a MariaDB long-running process (40 hours), so I killed the thread. But, the thread is still there, with: showing Command as Killed. a State of Unlocking tables. Info is insert into ... What does this mean? More importantly, how do I get…
David Rogers
  • 123
  • 6
2
votes
1 answer

How to immediately terminate a SPID with a very long rollback time estimated?

I have a script to restore a database from a backup. Prior to the restore command, it has: set single_user with rollback immediate The script seemed to be hanging here. I used sp_who2 to find out a SPID number 70 was in ROLLBACK state. I then used…
youcantryreachingme
  • 1,655
  • 3
  • 21
  • 36
1
2