Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Azure SQL Database is a relational database-as-a-service from Microsoft. This tag is for questions about Azure SQL Database, NOT SQL Server hosted in an Azure VM (use azure-vm).

1
vote
1answer
27 views

Is it good practice to have relationship between the tenant table and all other tables in a multi tenant application?

I am developing a multi tenant SaaS that uses Azure SQL for data storage. I make use of sp_set_session_context to make sure that any query only touches records relevant to the current tenant. I ...
0
votes
1answer
48 views

What would cause a transactional replication subscription to restart repeatedly with no errors?

I have set up a transactional replication publication/subscription to test a migration from an on-premise SQL 2016 Enterprise Edition installation to Azure SQL DB and I'm finding that when the ...
2
votes
1answer
36 views

Migrating 300GB database to Azure SQL Server

We are having a devil of a time trying to migrate our current on-premises SQL Server to an Azure SQL Database. It is large but not that large (about 300 GB). We've tried the "Publish to Azure" option ...
0
votes
1answer
18 views

Is there a way to restrict automatic statistics updates to a certain timeframe?

I have an Azure SQL Database that runs on average at < 10% DTU capacity. It seems that at random times during the day large statistics update queries will execute on the database, causing DTU (...
4
votes
2answers
70 views

Experiencing CLR error on SQL Azure DB

Out of nowhere we started seeing this error and it seems to occur fairly frequently when making calls to the database or any other database in our Elastic Pool. The DTUs aren't being maxed out and the ...
4
votes
1answer
401 views

How can I clear buffer for a SQL Server DB Hosted On Azure?

I am trying to fine tune my queries and Stored Procedures. The Issue that I am facing is that there is no way to clear the Database buffers in Azure. Which means that I cannot use DBCC ...
0
votes
1answer
19 views

How to copy data from Azure SQL DB into Azure SQL DW

I need to copy some data from an azure SQl DB instance into my azure data warehouse. The most obvious way to do this is to use Elastic Query, similar to the below: CREATE EXTERNAL DATA SOURCE SqlDb ...
0
votes
0answers
16 views

Unable to configure Alerts on Metrics for Azure SQL DB

I am trying to configure Alerts(not classic alerts) on Metrics for an Azure SQL DB. I have navigated to the "Create rule" blade under Monitor The problem is when I select a SQL database target the ...
1
vote
1answer
20 views

Is it possible to set up Azure as a publisher for Pull Replication to an on-premise database?

I am trying to set up Pull Replication from an Azure database to an on-premise database. I have set up the on-premise database as the distributor but when I try to establish a subscription to the ...
4
votes
1answer
215 views

Cannot create SP in Azure SQL Database

I am trying to create a stored procedure on my Azure SQL Database, which has joins to other database table in Azure SQL Database. I am getting the following error while creating the Stored Procedure: ...
2
votes
1answer
50 views

Out of Memory Exception When Creating BACPAC File

We're having a frustrating time migrating our on-premises SQL application to Azure. The database is large but not crazy, about 265 GB. SQL Server Management Studio > "Deploy Database to Windows Azure ...
-1
votes
1answer
52 views

Oracle Linked Server in Azure SQL Database Managed Instance

I am migrating my On Premise SQL Server to Azure SQL Database Managed Instance. But I have linked server to Oracle database in my SQL Server. Can we create linked server to an On Premise Oracle ...
0
votes
0answers
30 views

BigData IoT table without foreign key

We thinking about switching our database structure to a more modern schema. We hope to reduce server performance peaks and gain more performance. This for I read some concepts about general so called ...
4
votes
3answers
124 views

Using CROSS APPLY OPENJSON causes Azure to hang

I have a table with around 8 million rows with a schema of: CREATE TABLE [dbo].[Documents]( [Id] [uniqueidentifier] NOT NULL, [RemoteId] [int] NOT NULL, [Json] [nvarchar](max) NULL, [...
24
votes
5answers
2k views

Changing the use of GETDATE() in the entire database

I need to migrate an on-premises SQL Server 2017 database to an Azure SQL database, and I'm facing some challenges since there's quite a bit of limitations to go through. In particular, since an ...
2
votes
2answers
69 views

How to Limit DTU Percentage Consumption for a Given Session in Azure SQL Database?

We have an Azure SQL Database tier S4 (200 DTU), and there is one big table inside When I run a "alter index rebuild..." statement, it takes about 18 mins to complete This particular nonclustered ...
1
vote
1answer
51 views

Does Azure SQL Data Sync support MySQL or SQLExpress?

I did see that it supports SQL Server (2005 and later) but does it support syncing between a SQLExpress server or MySQL server and an Azure Server? I'm trying to use it with a SQLExpress server but ...
0
votes
1answer
31 views

Best High Availability Solution for SQL Server 2014

Please we are about to implement High availability for for SQL server 2014 on our new infrastructure but i need to know which is best between SQL Failover Clustering and Always On High Availability ...
0
votes
1answer
64 views

MySQL Workbench Unable to Connect to Azure Databases for MySQL

When trying to connect to a MySQL database in Azure I get the following error: ERROR 2026: SSL connection error: socket layer receive error At first I thought it was a firewall/security issue but ...
1
vote
2answers
55 views

Stored Procedure return unwanted cursor result

Context I have created a stored procedure that simulates a merge command for an OLTP in-memory table. It used the simulated merge for upsert moving massive data form a normal table to an OLTP one. ...
2
votes
0answers
35 views

Is there a way to programmatically get the version of a .bacpac file without unzipping and inspecting the xml?

The situation is that we get a copy of the latest production bacpac, then restore it locally when setting up our dev environment. During the setup, we do an explicit check for the DacFX dll but target ...
1
vote
2answers
36 views

How to force/require TLS connections on SQL Azure

You can make a secure connection to a SQl Azure instance following these instructions from microsoft. However, this only works when the user specifies it in the connection string. How do I set SQL ...
0
votes
1answer
65 views

Statistics update on Azure SQL DB

New to Azure SQL DB. I was wondering what is the best practices for scheduling jobs like update statistics in Azure SQL DB. Googling got a couple of blogs that uses Azure automation. https://blogs....
6
votes
3answers
358 views

Why does this query take so long to execute?

I'm currently using Microsoft SQL Azure (RTM) - 12.0.2000.8 as the database. The database currently has 10 DTUs. The idea here is that I want to make the query based on the view. This view contains ...
0
votes
1answer
48 views

Always Encrypted - Lock request time out period exceeded

I'm trying to encrypt a column and am getting the following error: Set-SqlColumnEncryption : Lock request time out period exceeded. Are there parameters to specify the lock timeout? What could be ...
1
vote
2answers
853 views

Bacpac Import fails with error 'The Element or Annotation class SqlDatabaseOptions does not contain the Property class CatalogCollation'

I want to restore some production azure database on my local machine for development purposes. So I exported the production database to a .bacpack file & downloaded that file on local. Now I am ...
4
votes
2answers
128 views

Partition elimination on order by

I have a partitioned table and problems with partition elimination. Setup My table if quite simple and looks like this: CREATE TABLE [data].[OperationData]( [DataLoggerID] [bigint] NOT NULL, ...
0
votes
0answers
13 views

Azure SQL database upgrade

Im wondering something regarding this article: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-manage-application-rolling-upgrade We would like to perform a database upgrade ...
1
vote
0answers
61 views

Help in understanding how to avoid a page-level deadlock

I have the following deadlock xml <deadlock> <victim-list> <victimProcess id="process9b7ade24e8" /> </victim-list> <process-list> <process id="...
7
votes
2answers
196 views

Help understanding why a deadlock occurred on row level index lock

I have the following deadlock xml <deadlock> <victim-list> <victimProcess id="process3340d548c8" /> </victim-list> <process-list> <process id="...
1
vote
0answers
15 views

Replicate multiple on-site SQL Server databases to Azure

I have a SQL Server Express 2014 named instance containing 3 databases (One for each office). connected to a WinForms application. Each database is uniquely named after the respective office although ...
1
vote
1answer
44 views

AWS VS Azure , which one is preferable for SQL Server 2012 standard version? [closed]

I want few recommendations while considering azure vs aws for our current database which is SQL Server 2012 standard edition. Currently we are using AWS RDS for managing our database, recently we had ...
1
vote
0answers
13 views

Any way to pass additional parameters to Azure SQL Audit?

We are exploring Azure SQL Auditing capabilities. It gives us a list of all the queries executed and some additional data which is good. However, field server_principal_name is always reflecting a ...
0
votes
2answers
125 views

set compatibility mode in Azure Sql Database?

Is it possible to set compatibility mode in Azure Sql Database to match SQL Server 2014 ? We have a existing application using SQL Server 2014 - can i just change the connection string to point to ...
0
votes
0answers
56 views

Can I run an index rebuild on a sql server HA replica or a copy the DB, and then swap with the primary?

We have a large database hosted in sql azure and we need to occasionally run maintenance tasks such as index rebuild. Pretty common of course, and we also try to minimize downtime. We use the premium ...
2
votes
2answers
367 views

The transaction log for database is full due to 'OLDEST_PAGE'

We have a database hosted on azure. It is part of an azure elastic pool. From yesterday all our database operation are consistently failing with following error. The transaction log for database is ...
5
votes
1answer
589 views

Finding the default isolation level in SQL Server 2017 and Azure SQL DB

I'm reading a book related to transaction and concurrency. In one paragraph it is mentioned that: In on-premises SQL Server instance the default isolation level is Read-Committed based on locking ...
1
vote
1answer
24 views

Query JSON in Azure SQL DB to get one array element per row

I have a stored procedure in a SQL Azure DB instance, and the input parameter is a JSON string formatted like this: { "OrderNumber":["OD12034"], "Site":["New York"], "LineNumber":[1000,...
0
votes
0answers
35 views

Azure SQL Database - good plan vs. bad plan

We have a SP query for a report, and every now & then (once a week), SQL will create and utilize a bad query plan. CPU spikes, subsequent queries back up and time out, etc... after about 30 ...
5
votes
1answer
150 views

Why is my Azure SQL (SQL Server) database getting overloaded with data IO for periods at a time?

I am running an Azure SQL database under the S2 edition (50 DTUs). Normal use of the server usually hangs around 10% DTU. However, this server regularly gets into a state where it will send DTU usage ...
0
votes
1answer
36 views

sqlcmd gives no sign of failure yet doesn't work

I am running sqlcmd from a linux bash script. My target server is an Azure SQL. I execute an sql file with a lot of sql statements (around 2500). These are Insert/update/delete statements. I used the ...
1
vote
1answer
41 views

Transfer data from the cloud to a local database

I have an SQL Server 2016 Azure database in the cloud called XCLOUD, with many tables big and small, and a local SQL Server 2016 database with the same tables and data called XLOCAL. In all databases ...
0
votes
2answers
155 views

Delete query uses 100% CPU with in Azure SQL Database

I have a relatively small database, maybe a few hundred thousand rows, and we have a stored procedure that is meant to clear out a 'Dealer' (the application aggregate root) and all of it's related ...
0
votes
1answer
237 views

Replication/Mirroring/etc from Azure SQL Database to On-premise SQL Server possible?

I have a table on Azure SQL Database that I would like to have replicated/mirrored to our on-premise SQL Server So the on-prem SQL Server would have a copy of table from Azure that is always up-to-...
1
vote
1answer
113 views

Azure SQL Databases: High number of SA connections with “BRKR TASK” and “TASK MANAGER” commands

Found out that all our Azure SQL Databases (pricing tiers S1-S2) have high number of connections/sessions from SA SA - BRKR TASK - around 60 sessions SA - TASK MANAGER - around 20 sessions Here are ...
1
vote
2answers
57 views

Azure SQL Db Linked Server - Secured Connection Methods?

The developers want a linked server from our on-prem server to our Azure SQL Db (DBaaS) in order to complete a nightly data pull into our data warehouse. I'd much rather go the route of SSIS but don'...
8
votes
2answers
320 views

What is causing high CPU usage from this query/execution plan?

I have an Azure SQL Database that powers a .NET Core API app. Browsing the performance overview reports in the Azure Portal suggests that the majority of the load (DTU usage) on my database server is ...
0
votes
0answers
25 views

Can I use TDS compression with Azure SQL DB or Managed Instances?

Currently, we have our data warehouse running on an Azure VM. We have NitroAccelerator installed there and on our client machines. Our analysts pull large data sets into Tableau, R, SSMS, etc. By ...
0
votes
2answers
95 views

HADR_THROTTLE_LOG_RATE_SEND_RECV_QUEUE_SIZE wait type

While uploading (bulk insert via BCP) a large amounts of data to Azure SQL Database I observe a long HADR_THROTTLE_LOG_RATE_SEND_RECV_QUEUE_SIZE waits. select session_id, start_time, s1....
1
vote
3answers
100 views

Azure PaaS Vs IaaS [closed]

I've be been tasked with deciding between iaas and paas for our upcoming product. I have gone through most of the documentation out there but unfortunately lacks any practical real-life experience ...