Share via

How to execute long-execution time queries in SQL Management Studio

Andrew Tabar 271 Reputation points
2024-12-16T15:17:56.72+00:00

I have a few queries that I need to run in SQL Server Management Studio that will take a VERY long time to complete, however, the SQL server is in an enclave with VERY aggressive timeouts for RDP sessions. This means that the RDP session times out/logs off the user before the SQL query can complete. Is there a way to start a query in SSMS and have it run in the background or otherwise run it without having to worry about the RDP session being disconnected?

0 comments No comments

Answer accepted by question author

Joel Esteban Santana Herasme 85 Reputation points
2024-12-16T15:58:53.5966667+00:00

You can configure your queries as SQL Server Agent Jobs, which allows them to run in the background without being tied to your RDP session. Schedule tasks using SQL Server Agent

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.