Increase time for executing queries in Azure SQL Server - sql-server

I'm using a database on a remote server (Azure) to execute queries. When I use SQL Server, I don't have problems (sorry, I can't post an image yet):
SQL Server
But when I try to execute the same query in Azure SQL, the runtime reaches a limit and stops working:
Azure SQL Server
My question is: how could I extend this runtime in Azure SQL?

Related

Azure Data Studio Not Showing SQL Pool Tables

I'm trying to access data on a SQL Server with Azure Data Studio. When connecting to the server it shows a SQL Database and a SQL Pool under Databases. I can see and interact with the Tables of the SQL Database but not with the SQL Pool.
When I use the same connection in SQL Server Management Studio all tables are visible for the SQL Pool.
Any idea what I might be doing wrong in Azure Data Studio?
It works now.
It seems one has to be careful in which order to resume the SQL Pool (this one is paused most of the time) and connect to the SQL Server.
So first resuming the SQL Pool and then connecting to the server seems to have done it.

How to know if SQL Server is in the cloud or on premises?

I recently joined in new job, they are using Azure SQL Server. Initially I don't know that SQL Server is in Azure. I am wondering how can I know whether SQL Server is in Azure or on premises?
Execute the query:
SELECT ##VERSION
The result will tell you if you are using Azure SQL Database or any other version/edition
** If you are talking about SQL Server on Virtual machine in the azure, then this is the same as local version/edition

Any options to connect from Azure SQL Server database to an Azure Data Warehouse instance

We want to be able to query the Data Warehouse database from the SQL Server database both with the same server name in Azure. Select statements including the database name (e.g. select * from server.dbo.product) returns with error that a reference to the database and/or server name isn't supported in this version of SQL Server. There are articles on creating an external data source in the SQL Server database but we get error that the credentials don't have permission to perform this action.
Azure SQL (as of Azure SQL V12 in late-2016) does not support cross-database queries the same way that they do with a normal on-premises SQL Server (e.g. using the DatabaseName.schemaName.TableName syntax).
Given that Azure SQL and Azure Data Warehouse databases each reside in different physical servers it wouldn't work anyway, as the above syntax is intended for databases that all reside in the same server.
Azure SQL does support cross-database calls via the EXTERNAL DATA SOURCE feature, which we have in normal on-premises SQL Server already. This is documented here: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/
Note that performance won't be that great and you might be better-off doing the querying in your application code. For example complex JOINs which reduce data will run suboptimally.

What is best practise to migrate On-premises SQL Server to Azure VM - Dynamic SQL Agent Jobs in AlwaysOn offering

I am trying to migrate On-premises SQL Server to Azure VM.
I am writing in reference to below link
https://azure.microsoft.com/en-in/documentation/articles/virtual-machines-migrate-onpremises-database/#azure-vm-deployment-wizard-tutorial
I am having multiple applications in which few are hosted in Azure and few are On-premises.
All these applications contact on-premise SQL Server for data manipulations.
In some scenario these applications creates dynamic SQL Agent Jobs!
Now my requirement is to move on-premise SQL Server to Azure cloud. I would like to know how can I manage these dynamic SQL Agents in Azure?
In short, My question is: how can I migrate below items?
SSIS packages associated with these databases
SQL Agent Jobs scheduled in server (created dynamically)
File Stream associated with server databases
Also I am planning to use SQL Server "AlwaysOn" offering. So how to synch these SQL Agent Jobs in these shared Virtual Machines?
I was referring https://azure.microsoft.com/en-us/documentation/articles/sql-database-general-limitations/ and it says as follow
Microsoft Azure SQL Database does not support SQL Server Agent or
jobs. You can, however, run SQL Server Agent on your on-premises SQL
Server and connect to Microsoft Azure SQL Database.
SQL Agents can be dynamically created as shown here https://www.mssqltips.com/sqlservertip/3052/simple-way-to-create-a-sql-server-job-using-tsql/ My question is, will these stored procedures run in azure cloud?
Update
It’s challenge but can be done. We need to setup new Job, which constantly monitors and pull the current role of the replica, based on PRIMARY role, we run the job needs to do if it is the primary.
Below link gives me hint
https://dba.stackexchange.com/questions/45137/sql-server-agent-jobs-and-availability-groups but I am looking for step by step blog/article to achieve this.

Automatic update of the Database Engine (SQL Server) in a web-application context

I'm working on a web application using Spring 3.0 and hibernate 3 with SQL Server 2008.
A specific work flow requires to check some data in the database periodically (each 1st of a month for example) and do some process (update some tables).
My question is, do I need to put a script on the server that will check continually the database? Or can I do this with SQL Server?
See:
How to: Create a Job (SQL Server Management Studio), specifically,
How to: Create a Transact-SQL Job Step (SQL Server Management Studio)
and
How to: Schedule a Job (SQL Server Management Studio)
The easiest and most flexible way will be to have an external script that runs at the desired times and does the updates.

Resources