3

I am connecting to and running queries on an Azure database (S4) which I connect to through SQL Server Management studio on my Windows 10 laptop. I have a complicated query I am running that gives me an select output after about 5 hours but since the database is so large any network problem causes me to get a transport error and lose any output I would have gotten.

if this happened with an on-premises database I would simply put the query in a SQL Server Agent job. But when connecting to an azure database instance I don't see any sql server agent in the Azure instance for me to add a query to.

I would like to be able to run a long running query remotely on a SQL Server Azure database without being dependent on stable network connection

choba78
  • 361
  • 3
  • 5
  • 13

2 Answers2

3

Put those queries on a stored procedure and then use Azure Automation to schedule the execution of the stored procedure. In this StackOverflow thread I show step-by-step how to schedule execution of a stored procedure on Azure SQL Database using Azure Automation.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30
1

Also an Azure VM jump box in the same region as your database is commonly used for stuff like this.

David Browne - Microsoft
  • 80,331
  • 6
  • 39
  • 67