Questions tagged [azure-sql-database]

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).

Filter by
Sorted by
Tagged with
3
votes
2answers
381 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
48 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 (...
5
votes
2answers
495 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
579 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 ...
-1
votes
1answer
380 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 ...
1
vote
1answer
57 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
767 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
365 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
739 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
37 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 ...
5
votes
3answers
2k 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, [...
27
votes
6answers
7k 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
506 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 ...
2
votes
1answer
390 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
35 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 ...
1
vote
1answer
784 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
299 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
124 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
873 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
2answers
1k 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
391 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
268 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 ...
3
votes
2answers
7k 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
172 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, ...
2
votes
0answers
164 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
2k 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
27 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
119 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
20 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
1k 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 ...
1
vote
1answer
47 views

best way to migrate a database? [closed]

I currently have a on-premise SQL Server 2014 High-Availability cluster. I will setup a active geo-replication/auto failover group in Azure. I need to do a one-time data migration---Should I use Azure ...
1
vote
0answers
59 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 ...
3
votes
2answers
5k 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 ...
8
votes
1answer
3k 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
84 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,...
9
votes
1answer
2k 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
207 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
68 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 ...
1
vote
2answers
1k 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
824 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-...
2
votes
1answer
846 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
293 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
4k 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 ...
1
vote
2answers
247 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
2k 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 ...
0
votes
2answers
2k views

Joining table from Linked Server is very slow

I have a production SQL server and a linked server (Azure SQL Database) I join two tables to do update Table A - small table A in TempDB that has only 100 rows on SQL Server Table B - on linked ...
1
vote
1answer
78 views

Always encrypted on Temporal tables

Is it now possible to apply Always encrypted to some columns on existing Azure SQL database temporal tables with existing data ? I know it was not possible a few months ago thru SSMS / powershell.
1
vote
1answer
104 views

Stored Procedure With an Optional Parameter Limiting Rows Returned if Specified

How would one go about having a sproc that allows a consumer to optionally specify the number of rows returned? If no row count is specified, then all rows returned.
0
votes
0answers
115 views

How can I convert integer value from query_hash_s in Azure Log Analytics to a VARBINARY(64) for sys.dm_exec_sql_text?

SQL Server errors are shown in Azure Log Analytics. Sometimes, the query_hash_s column is populated. But the values provided appear to be BIGINT. How can I use that value to find the actual text of ...
12
votes
1answer
5k views

Slow order by SQL Server

In my application, I have a query which performs a search in "files" table. The table "files" is partitioned by "f"."created" (see the table definition and has ~26 million rows for the client 19 ("f"...