Is it possible to configure query timeout in Azure SQL Database? - azure-sql-database

I have an Azure SQL Database and I can't find where to configure Query Timeout for all queries running on that database. Right now I have queries that run for days and even though I think all applications should have connection timeouts set, I also believe that there should be a way for the database itself to timeout the connection.
Is it possible to do this configuration for Azure SQL Database?

In SSMS, Tool--> Options-->Query Execution, we can set the Execution time-out:
I connect to me Azrue sql database with SSMS. I'm not sure if this works for Azure SQL database. We can't find the query time-out time of Azure SQL database, I once ran a query that took me more than 10 minutes. We can not find anything talked about it in Azure SQL document.
Hope this helps.

Related

Run a query automatically SSMS without SQL server agent

I'm a new PowerBI developer.
I am inserting data from the Azure SQL database via SSMS.
I don't have access to a server agent for being able to create jobs.
I just want to run 4-5 queries (1 query = 1 step for my job). Is there a simple way to do this automatically for example?
Well, there's no server agent in Azure SQL DB, so you cannot create jobs as you do in on-prem or on Azure VM installations.
However, you do have Elastic jobs on Azure which can run queries on Azure SQL Database periodically.
See the documentation here.

Where Azure SQL Database logs for failed Data Manipulation SQL queries?

I can find tools in Azure to monitor and get logs on the performance of the Azure SQL database. However, what tools are available in the Azure portal to see logs of failed SQL data manipulation queries of the database? - e.g. update, delete, insert queries?
Thank you
In case someone need this to I got an answer elsewhere with Extended Events though didn't yet try https://techcommunity.microsoft.com/t5/azure-database-support-blog/extended-events-capture-step-by-step-walkthrough/ba-p/369013

How to run a T-SQL query daily on an Azure database

I am trying to migrate a database from a sql server into Azure. This database have 2 rather simple TSQL script that inserts data. Since the SQL Agent does not exist on Azure, I am trying to find an alternative.
I see the Automation thing, but it seems really complex for something as simple as running SQL scripts. Is there any better or at least easier way to do this ?
I was under the impression that there was a scheduller for that for I can't find it.
Thanks
There are several ways to run a scheduled Task/job on the azure sql database for your use case -
If you are comfortable using the existing on-premise sql sever agent you can connect to your azure sql db(using linked servers) and execute jobs the same way we used to on on-premise sql server.
Use Automation Account/Runbooks to create sql jobs. If you see marketplace you can find several examples on azure sql db(backup,restore,indexing jobs..). I guess you already tried it and does not seem a feasible solution to you.
Another not very famous way could be to use the webjobs(under app service web app) to schedule tasks(can use powershell scripts here). The disadvantage of this is you cannot change anything once you create a webjob
As #jayendran suggested Azure functions is definitely an option to achieve this use case.
If some how out of these if you do not have options to work with the sql directly , there is also "Scheduler Job Collection" available in azure to schedule invocation of HTTP endpoints, and the sql operation could be abstracted/implemented in that endpoint. This would be only useful for less heavy sql operations else if the operation takes longer chances are it might time out.
You can use Azure Functions to Run the T-SQL Queries for Schedule use Timely Trigger.
You can use Microsoft Flow (https://flow.microsoft.com) in order to create a programmed flow with an SQL Server connector. Then in the connector you set the SQL Azure server, database name, username and password.
SQL Server connector
There are many options but the ones that you can use to run a T-SQL query daily are these:
SQL Connector options
Execute a SQL Query
Execute stored procedure
You can also edit your connection info in Data --> Connections menu.

sql stored procedure for data feed

I have a question on SQL DB running on Azure.
Can I have a timed procedure in Azure SQL that selects a value from a field in a .csv file and appends it to a table? I ask because I found this article that says Azure lacks the SQL Agent to facilitate this: https://www.cotega.com/docs/sql_azure_scheduled_job
I should just try it I know but I have not attempted to do this before and wanted to seek advice before taking a shot at it.
Thanks in advance
Azure Automation provides a great cloud-based alternative to SQL Agent. Please see Azure Automation: Your SQL Agent in the Cloud and Truncate table in SQL DB if DB is approaching max size.

Sync between Sql Server and Mysql Server

I have 2 big tables in sql server that i need to sync to mysql.
now, i need that as an ongoing process.
the tables are 1 GB each and getting new/update/delete row every 0.1 second.
Can you recommend me a tool that can do it that is not resource expensive.
you can offer OPEN SOURCE and commercial as well
Thanks
You could create a linked server instance in SQL Server, pointing to the MySQL instance. This article gives the step-by-step process. Once that is in place, providing you grant the MySQL user you connect on behalf of proper permissions, you can write to the MySQL instance as you like. So you could easily update stored procedures to do an additional step to insert records into MySQL.