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
-2
votes
0answers
33 views

Is making the primary key also the clustered index a mistake/pitfall/trap?

For the tables in our schema, we've so far just been creating them with the primary key defaulting to being the clustered index. Our assumption was that we would be able to change the clustered index ...
0
votes
1answer
28 views

On-premises SQL to Azure SQL MI Migration

We have a requirement to migrate around 800 GB of data from on-premises SQL Server (2012 and 2017) spread across multiple databases to Azure SQL MI. We have run the DMA on the source data and have got ...
-1
votes
1answer
42 views

Strange behavior with Quotename and substring

I am seeing some behavior that I cannot figure out. We have a sproc that joins a bunch of tables and filters down some pipe-separated (|) values in a column. We cross apply a string splitter (I ...
2
votes
1answer
68 views

Azure SQL Database - Modify cost threshold for parallelism

I attempted to update the value of cost threshold for parallelism but since my database is an Azure SQL database I can't run the command: EXEC sp_configure 'cost threshold for parallelism', 40 ; GO ...
7
votes
1answer
116 views

Updating rows in Azure SQL Server causing unexpected page splits

I'm getting a lot of page splits in a live environment using Azure SQL Server PAAS that I don't understand. The update that's occurring should not increase the size of the row and therefore never ...
0
votes
0answers
36 views

Azure SQL Server table taking unreasonable space

I got a table defined like this: CREATE TABLE [dbo].[INIT_AccessControl]( [timestamp] [timestamp] NOT NULL, [Id] [int] IDENTITY(1,1) NOT NULL, [CustomerID] [int] NOT NULL, [...
0
votes
0answers
14 views

Can you bulk upload a file from a remote server to a Azure Managed server

I have a .NET app on a remote server that downloads and processes a file which it then saves to disk, this file is then bulk inserted by SQL and further work carried out. This works a treat when ...
0
votes
1answer
81 views

Why is this SQL Server table using so much space

We have a table in an Azure SQL Server DB that is using about 15x the expected used space for the number of rows x average row size. This is occuring with a customer that uses Azure SQL (not managed ...
0
votes
1answer
35 views

Azure SQL versioning

While working to restore some SQL 2017 DBs to my Azure SQL DB for some testing we ran into an issue where Azure SQL is running a lower engine version than the VM we pulled the DBs from. Is there a way ...
-1
votes
1answer
16 views

What is the equivalent of on prem ha dr solutions in the azure cloud PaaS and SaaS?

On prem ha dr solutions are: Log shipping Mirroring Replication FCI AG What is the equivalent of each of the above in the azure cloud PaaS (azure sql managed instance) and SaaS (azure sql ...
0
votes
0answers
25 views

Azure SQL Server DTU Percentage degrades over time with API Throttling

I've been facing a weird DB behavior when trying to post records to my api. I have a function that throttles requests at a request rate of 10-15 req/s, each request results in a lookup and an insert (...
0
votes
0answers
15 views

script to find info on Azure sql dbs,Azure mysql dbs

I would like to check if we have a powershell script which can fetch all properties of a particular service like logical servername, resourcegroup etc for all azure sql databases (PAAS) and azure ...
0
votes
0answers
14 views

Azure SQL database make AD user see more databases in SSMS

I'm using Azure SQL databases and want to add a user from my company using Active Directory auth, so adding the user from external provider. The problem - by design Azure SQL creates AD users as ...
1
vote
3answers
95 views

Partitioning and existing Indexes

I have a table that consumes almost 900 GB of space and has lots of historical data which are mostly irrelevant. Since performing bulk DELETE is going to cause a lot of heavy-lifting, I'm trying to ...
1
vote
1answer
67 views

Improve performance searching nvarchar values on varchar column

I have a table with order data in an azure sql database. Our web developers (using django) consistently have queries that look like... SELECT col_one, col_two from order_headers where order_number = ...
2
votes
2answers
297 views

Reduce the size of a primary key Index

I'm using Azure SQL DB and noticed that one of my largest databases appears to have a primary key index with a total size of 6Gb. It's a clustered index on a uniqueidentifier. However, the total rows ...
0
votes
1answer
22 views

Copy database backup files from Azure to on-premise network

Goal - Take a database backup in Azure and copy the backup file(s) to company network for archiving. Note that I'm not asking how to copy a database. Research - I have knelt at the alter of Google, ...
0
votes
1answer
5 views

Save changes of records of products in Azure DB in way that we can see historical data

I am curious about "best" model for my purpose of storage of data (include historical changes) in Azure DB that I will be able to see timeline of that changes. Example: We have some company ...
0
votes
1answer
18 views

Azure SQL Database system view/function permissions

I have a diagnostic query that uses these system views/functions: sys.dm_exec_cursors sys.dm_exec_sql_text sys.sysprocesses sys.syslockinfo The actual query is pretty big but I can include it if it'...
3
votes
1answer
178 views

How to tell if an index has OPTIMIZE_FOR_SEQUENTIAL_KEY turned on?

SQL Server 2019 brings the OPTIMIZE_FOR_SEQUENTIAL_KEY option that, as far as I know you specify on index creation or alter using the WITH keyword. But how do you check if the option is already turned ...
0
votes
1answer
20 views

Specific port of Azure SQL Database Serverless

The security rule of our company requires us to change the port from 1433 to another. But is it possible to change the port for serverless SQL? I search a bit and it seems only applicable for ...
0
votes
1answer
37 views

On premise to cloud restore - Automated?

What's the most automatic way to restore a on-premise SQL Server database to Azure SQL Database? Has anybody done or seen such a solution? Scenario: Need to do a weekly refresh of a dev database from ...
0
votes
1answer
29 views

How do I give my non-Azure app access to Azure SQL Server without whitelisting an ip address?

I have an app that is deployed to Vercel. It is registered in Azure AD and uses AAD for authentication. I added my personal ip to the whitelist, and when I run it locally, everything works as it ...
0
votes
2answers
48 views

How can I suppress or disable temporal table history insertion for a single statement or transaction?

I have a table that stores Customer information (your bog-standard CRM stuff): CREATE TABLE dbo.Customers ( TenantId int NOT NULL, CustomerId int NOT NULL, ...
1
vote
1answer
42 views

Alternatives to AzureSQL temporal tables

I have recently been learning about temporal tables in AzureSQL and am considering implementing this into my codebase. However, columnstore indexes are only available for Azure SQL databases of tier ...
0
votes
0answers
7 views

Are FullText catalog indexes managed by Azure SQL?

I know normal indexes are maintained (reindexed) automatically on azure SQL. (without the need of having to create a jschedule job to run it periodically) However, non of the documents are clear to me ...
0
votes
2answers
46 views

insert on table being unnaturally slow

I have an "Basic" pricing tier Azure SQL database with a table of 7 columns, an ID column of int that is the clustered index and primary key, one datetime2(0) column, 3 varchar(100) columns ...
0
votes
1answer
29 views

Azure SQL Read-Only table Indexing

I'm trying to work out the best indexing strategy for a slightly weird pattern I'm forced to use with Azure SQL. Tables are dropped, re-created & loaded with new data daily from ADF Tables are ...
0
votes
0answers
15 views

Row Level Security on Multiple tables/Views

I’m looking for some guidance on implementing multiple row level security policies for different use cases on the same tables/views. Basically, I have a view “ReportView” used for a report which has a ...
0
votes
0answers
11 views

How to configure a Azure MySQL DBMS software configure according to vendor guidance?

We currently in the process of the Implementing below Standards required. https://www.cyber.gov.au/acsc/view-all-content/guidance/database-management-system-software ISM - 1246 - Hardening and ...
0
votes
2answers
25 views

Can I make a short-lived readonly snapshot for reporting in Azure SQL DB?

I have an Azure SQL DB (OLTP), that is under considerable load, let's call it AppDB. AppDB is transactionally consistent, but new rows are written to it constantly. Now I need to populate ReportingDB ...
1
vote
1answer
63 views

Configuring Azure SQL Server and SQL DB instance with MFA/2FA for On-premise AD DS synched account

I've synched my OnPremise AD DS users into Azure using Azure AD connect. How can I enable the user of my Azure SQL Server and Azure SQL DB instance to use MFA/2FA when connecting with SSMS using the ...
0
votes
1answer
28 views

How should I handle Azure SQL hanging when scaling up from General Purpose to Hyperscale?

I'm in the process of scaling up an Azure SQL database from General Purpose to Hyperscale. This has been running for more than 12 hours. When I check the "Ongoing operations" it says that it ...
6
votes
2answers
129 views

Optimize extraction of json data via OPENJSON

I'm attempting to optimize extraction of values obtained from a REST API which returns json values in an array. Here's an minimal, complete, and verifiable example that reflects exactly what I'm doing....
0
votes
1answer
184 views

How to add a login to the dbcreator role?

Using SSMS, I'm having trouble adding a new login to the server dbcreator role on my Azure SQL instance. Here's the syntax I'm using: CREATE LOGIN test WITH PASSWORD = 'SuperSecret!' ALTER SERVER ROLE ...
1
vote
0answers
24 views

Filtering for user transactions in Azure Log Analytics

We have audit logging in Azure Log Analytics set up for an Azure SQL Database we operate. I would like to query these logs to view user transactions to track down queries that have unintended ...
1
vote
1answer
35 views

Azure SQL - Using Copy Database between two subscriptions with private endpoints

If using the tsql "CREATE DATABASE Database2 AS COPY OF server1.Database1;" on an Azure SQL server to copy a database between servers in different subscriptions, then this works fine when ...
-1
votes
1answer
57 views

Performance monitoring [closed]

I need to get the performance metrics like CPU usage in sql server using sql query and store it in a history table , where I will keep on adding the old records . And a current table to maintain the ...
4
votes
2answers
167 views

How to resume Azure serverless SQL Server from pause

I created a serverless sql on azure and didn't use it for few weeks. Now when I go back to it, I found it's in Pause status. But searching the azure dashboard, I can't find any way to resume it. When ...
0
votes
0answers
59 views

Bloated estimate in sql server

We are having an issue in one of our SQL Azure. The query plan shows 291269 estimated number of execution with a total of 13 million rows to read. This table has 36892 rows and is the first table that ...
1
vote
0answers
22 views

Azure SQL custom backup role

We are currently running an Elastic Pool within azure to host all our databases. We need to back up these to on-premise as well in case of an emergency, and for it we are trying to use sqlpackage. Now ...
1
vote
0answers
127 views

Change database owner of Azure SQL Database

I want to change the database owner of an Azure SQL Database. I can do this via the server administration user. However I want to do it using a different user. Why? Because I have a process which ...
2
votes
2answers
49 views

How to troubleshoot intermittent Azure SQL performance issues

I'm running an Azure SQL instance behind an Azure Web App, both of which run perfectly fine the majority of the time. At seemingly random intervals (ever few days or so), the database DTUs peg out ...
0
votes
1answer
85 views

Azure Read Replica in Elastic pool performance

We have a Azure Database with a read replica. However the read replica seems to be effected by the load of the primary database. The primary database is in an elastic pool. Does the read replica make ...
1
vote
1answer
36 views

How can I change the Azure SQL INDEX's "auto_created" flag from 1 to 0? (It conflicts with SSDT)

I've been experiencing a longstanding issue where SSDT will think a table index in my Azure SQL database doesn't exist, when it actually does. After the past few hours of digging through XEvent traces ...
0
votes
0answers
25 views

Tracking locked rows using dm_tran_locks

I use Azure SQL DB (Basic, DTU, Provisioned). Isolation is default read committed snapshot. To handle concurrent transactions, I use table hints to lock the row(s). The requirement is that during the ...
1
vote
0answers
24 views

Create a specific role in a replicated AZURE SQL database, which is in read mode

Can you give me some help with my Azure Sql, I am having a difficulty with assigning a new role to a database with "geo-redundancy". My current structure is: BD1 in zone_A replicated to ...
10
votes
1answer
319 views

Why does a clustered Key Lookup on a primary key have a high estimated rows per execution?

We have a query with a Key Lookup which is estimating thousands of rows per execution. As I understand it, there should only ever be one row per execution. I understand statistics can be misleading ...
0
votes
1answer
70 views

importing bacpac file using sql package

How can I specify Database maximum size when importing bacpac file using sql package? The maximum size of 32GB is auto-sizing, but my actual DB size is over 35GB. Can I get to use DatabaseMaximumSize=(...
1
vote
0answers
17 views

Getting insight into partitions of a table in Azure Synapse (similar to SQL Server) [duplicate]

I'm using Dedicated SQL-Pools AKA Azure Synapse (which is different from serverless/on-demand Synapse that comes with Azure Synapse Analytics). And According to Azure: While the syntax of ...

1
2 3 4 5
16