By accident, I issued in the region of 500,000 individual queries against my database. It's been running for 6 hours now. When I restart the server, they continue to connect and run. I need them to stop - how can I do this?
migrated from stackoverflow.com Jul 20 at 22:48
This question came from our site for professional and enthusiast programmers.
closed as unclear what you're asking by Mark Storey-Smith, ypercube, StanleyJohns, Paul White, Jon Seigel Jul 22 at 1:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking.If this question can be reworded to fit the rules in the help center, please edit the question.
This will kill every connection to your instance that has a running request and is connected to
Now this won't stop new queries from coming in. If you have some process that is adding new queries you will have to give us some details on that for us to help you.
EDIT: Here is also a version to pull for a specific user.
Also based on Aaron's comment you could easily disconnect all connections to a given database like this: