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

SQL query takes a long time - Index Spool and a Key Lookup that I've removed

We're having performance issues with a specific query in the SQL Server database. I've checked the logs in Application Insights and this is the only query that occassionally takes a long time to ...
nop's user avatar
  • 101
0 votes
2 answers
75 views

How does this user log in to the database server, when its login is deactivated on the database server?

I've specifically disabled a login on the database server. This is an Azure hosted SQL-as-a-Service database. alter login [********@hotmail.com] disable Here's what the login looks like on the server....
Yossi Geretz's user avatar
0 votes
1 answer
50 views

How do I create user logins on my read replica database?

Is it possible to have different users accessing my read replica DB? Isn't this in fact a popular use case for a read replica? I want a certain limited set of credentials to have access to my primary ...
Yossi Geretz's user avatar
1 vote
1 answer
15 views

I'm having trouble copying database users from one Azure SQL Server to another. The EXECUTE permission was denied

I'm trying to use the instructions here - https://learn.microsoft.com/en-US/troubleshoot/sql/database-engine/security/transfer-logins-passwords-between-instances to copy logins between the server ...
Yossi Geretz's user avatar
1 vote
1 answer
16 views

Can I create a read replica of my primary Azure SQL Server database on a different server with a different name?

I have a database named myAppDB on an Azure hosted SQL Server in the Eastern US Datacenter. I created a new SQL Server in the South Central US datacenter. I then Created a Geo Replica of myAppDB on ...
Yossi Geretz's user avatar
0 votes
0 answers
6 views

Using Entra authentication with a group as the admin fails

I'm trying to connect to an Azure Sql Server resource using Entra authentication only (not mixed). I have an Entra group for my project with the team members who can function as admins on the sql ...
Brad's user avatar
  • 101
0 votes
0 answers
49 views

LWLock: BufferMapping - postgres [closed]

good afternoon! I have my database in Azure, it is Postgres in version 14.9, flexible. his ability: General Purpose, D16ds_v4, 16 vCores, 64 GiB RAM, 8192 GiB storage iops: p60 (16000iops) I take care ...
Leandro Macedo's user avatar
0 votes
0 answers
24 views

Deadlock - due to long transaction SQL server

I've got a stored procedure that runs 3 inner procedures all within a one BEGIN TRANSACTION. The environment is : Azure database sql as a result i have many deadlocks for the table : TranStatus. the ...
dexon's user avatar
  • 47
1 vote
2 answers
45 views

Getting "PAGEIOLATCH_SH" on a Named Replica of a HyperScale Database in Azure?

I have a monitoring query that populates a dashboard. It was created to monitor the transactions that occur on the primary replica. To avoid overloading the Primary Replica, I created a Named Replica. ...
Heliot's user avatar
  • 9
1 vote
1 answer
33 views

Can't see table partitions after adding PK

I'm on Azure SQL, adding monthly partitioning to some historical archive tables (creating a 2nd table with partitioning scheme/function and dumping the rows from the original into it). I was using a ...
dave111's user avatar
  • 13
0 votes
0 answers
56 views

Can sp_whoisactive show execution plans on Azure SQL Database Hyperscale?

My new client is running their database in Azure SQL Database Hyperscale. I'm running EXEC dbo.sp_WhoIsActive @get_plans=1 and normally I would get most execution plans, but on this system it is ...
Henrik Staun Poulsen's user avatar
0 votes
0 answers
86 views

A SQL Query without Key Lookups takes 5-30 seconds to execute

I've pulled a query from our production environment due to how long it takes 5-30 seconds. Initially, the execution plan revealed several key lookups, which I've managed to eliminate by adding the ...
nop's user avatar
  • 101
0 votes
1 answer
71 views

How automate backup and restore in Azure SQL Managed Instance?

I'm the DBA of one Azure SQL Managed Instance and one of our clients asked us if is possible automate a backup and restore in order to have a copy of one of the database before one of our ETL procces ...
SakZepelin's user avatar
-2 votes
1 answer
24 views

Downgrade SQL of a managed instance

In an attempt to stay up to date , we opted for a managed instance in azure to support our SQL database. Our application only goes up to version SQL 2019 but the managed instance is SQL 2022. Is there ...
isshaida's user avatar
0 votes
0 answers
54 views

Permissions for setting a baseline for SQL vulnerability assessment rule

I'm getting a SQL vulnerability error discovered by Microsoft Defender for Cloud. The error points to the following Vulnerability Assessment rule. But when I try to set a baseline (recommended by this ...
nam's user avatar
  • 291
-4 votes
1 answer
65 views

How can i write a sql statement to get customers who have rented at least one film from each category from dvdrental

How can i write a sql statement to get customers who have rented at least one film from each category, to Return customer_id, first_name and last_name. from dvdrental
DonnyE's user avatar
  • 1
0 votes
3 answers
73 views

How to exit the Azure SQL script to skip all remaining batches?

I have a Python script that glues together individual SQL scripts like: creating tables, creating views, creating functions, creating stored procedures... It produces the single installation SQL ...
pepr's user avatar
  • 143
0 votes
0 answers
16 views

How do I assess the performance impacts of a PK/clustering key that is a GUID string stored in an NVARCHAR(36), compared to e.g. an integer?

I've inherited a codebase to look after where predominantly the primary, clustering key of choice in any given table is a GUID stored as a dash-notation string in an NVARCHAR(36). This naturally has ...
flackoverstow's user avatar
0 votes
0 answers
81 views

Database disappear from Failover Group

I run an Azure subscription with a main SQL Server in West Europe and a georeplicated SQL Server in North Europe with a failover group. In these servers I have two elastic pools with the same name. ...
Paolo Crociati's user avatar
0 votes
1 answer
57 views

How do I determine the right Compute setting for Azure SQL Database

I have a pretty simple web app performing CRUD and search on a small dataset (maybe 200K). With everything appropriate (I believe) indexed. How do I figure out the correct Compute setting? I first did ...
David Thielen's user avatar
1 vote
3 answers
88 views

Azure SQL index rebuild after huge size reduction

We have a table in an Azure SQL database that used to have an nvarchar(max) column storing pdf files. (The wonders of external developers.) The table grew to 156 GB. It has 476000 rows. After changing ...
vacip's user avatar
  • 123
0 votes
1 answer
29 views

Connection Error when trying to connect to Azure SQL Database from a Virtual Machine

We're currently facing a connectivity issue while attempting to connect to the Azure database from our on-prem Virtual Machine (VM) through SQL Management Studio.Vm is hosted on ESXI. The VM ...
sam john's user avatar
0 votes
0 answers
167 views

Ado net source fail to acquire connection

I have a SSIS package package that connects with azure sql database through using ADO net connection manager with SQLclient data provider. Authentication method used is Integrated security. The SSIs ...
Agent SKY's user avatar
0 votes
0 answers
20 views

Azure SQL Can't Connect to DB through SSMS Though User Can Log Into Different DB on The Same Server

I have a SQL Server on Azure with two databases which I can see just fine with the admin account Now using a regular user account I need to specify the DB i want to connect on the configuration ...
efx's user avatar
  • 1
0 votes
1 answer
34 views

performance - Alter table from NVARCHAR(MAX) to NVARHCHAR(4000) - HADR_THROTTLE_LOG_RATE_MISMATCHE -

I'm Altering some tables with a lot of NVARCHAR(MAX) column to NVARCHAR(4000) in Azure sql environment. I've already upscaled the database to 3000 DTU, and executed the script to alter. I see that ...
dexon's user avatar
  • 47
0 votes
1 answer
124 views

How can I access table with Always Encrypted in SQL Server Authentication?

Working on Azure SQL Server I approached Key Vault with Azure AD and generated a column master key and column encryption key to apply Always Encrypted to a specific table Therefore, if login the ...
user avatar
0 votes
1 answer
34 views

Proper way of copying larger data from another Azure database?

Being the 3rd party that is allowed to read from the Azure SQL (in cloud), we need to simulate access to the data as in the older version of the ERP that used plain old MS-SQL server. Only the subset ...
pepr's user avatar
  • 143
0 votes
0 answers
39 views

How to add user to Azure SQL in a way they can browse databases they have access to?

Context I have an Azure SQL Server with a few databases inside. I used CREATE USER [user] FROM EXTERNAL PROVIDER on every database to create users for my team members. I grant them db_datareader ...
user avatar
0 votes
0 answers
13 views

How can I uses SSMS to create an Azure Database that is General Purpose 2GB

I have tried several combinations with no luck. In SSMS, going to Tasks | Deploy Database to Microsoft Azure SQL Database, what do I set in: and to end up with
David Thielen's user avatar
1 vote
0 answers
52 views

How to efficiently manage large amount data in Web apps

I am developing an application that needs to store a large amount of product data and display it in a web app. The data is generated every day, and each product will have approximately 100 rows per ...
Flow's user avatar
  • 11
1 vote
1 answer
219 views

Azure SQL Database Elastic Pool Resource Limit Exceeded - How to Resolve?

I'm encountering an issue with my Azure SQL Database where I'm receiving the following error: System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command ...
Jef's user avatar
  • 111
0 votes
1 answer
130 views

How can I copy a database schema from my local Sql Server to Azure SQL Database

I figured the way to do this was to go to my existing database (Sql Server 16.0.1105.1 developer edition) in SSMS and run Tasks | Generate Scripts... This includes a FullTextTable. So I then got the ...
David Thielen's user avatar
0 votes
1 answer
125 views

How do I change the password for a login on Azure SQL Database via SSMS

I'm in SSMS connected to my SQL Database on Azure I right clicked on the login - no properties choice in the menu How can I change the password for a login?
David Thielen's user avatar
1 vote
0 answers
36 views

Azure Elastic Job - a stored procedure does not run on the target database

The target group NPBlue contains 3 databases NPBlue 882E2367-93C0-46CC-A4ED-90AE5F2860EB Include SqlDatabase 69B479D8-34FA-48A6-9A3D-6B302864B9AD NULL NULL NULL x-database-weu.database....
Neurobion's user avatar
0 votes
0 answers
138 views

Failed to connect to Azure SQL Database using ODBC Driver 17 with Authentication=ActiveDirectoryMsi

I was trying to connect the Azure Container Instance to my Azure SQL Database using Azure Active DIrectory User Managed Identity. But I can't establish a connection using ODBC Driver 17. Error Message:...
xbai15's user avatar
  • 1
0 votes
1 answer
119 views

Reducing Fragmentation on a clustered columstore index

I have a database with a clustered columnstore index on it. The table has 1,685,123,846 records in it. I use the ola hallengre script monthly to rebuild the index, but it takes so long to run before ...
Ross Dargan's user avatar
0 votes
1 answer
1k views

Grant VIEW DATABASE STATE on master DB

I am asked to provide access to VIEW DATABASE STATE in the master DB of an Azure SQL Server instance (Premium P6) to an external user (vendor) in order some investigation to be done. When run "...
Pavel's user avatar
  • 1
0 votes
1 answer
208 views

Best solution for storing metadata and data from documents?

First of all do I want to mention that I'm fairly new to databases and big data. Background: I'm working for a large company who wished to unify all their documentation. At it's core of my project am ...
nklsla's user avatar
  • 101
0 votes
2 answers
103 views

How does SQL Server row-level security impact foreign key relationships?

I have a multi-tenant application sharing a single Azure SQL database using row-level security. The security predicate keys off of a "TenantId" column in all tables. Simplified, I have the ...
Dave Mateer's user avatar
0 votes
1 answer
97 views

How route traffic to a Azure SQL server via a jump server to prevent whitelistingof dev machine?

I have to connect to Azure SQL server (e.g. mydatabase.azuredb.windows.net:1433). In order to do so, i have to inform my ADMIN to whitelist my machine's IP, works fine that day. NExt day my machine ...
AsitK's user avatar
  • 101
3 votes
3 answers
403 views

Getting a SORT operator when I have an index

On a Azure SQL db (SQL2019 compat), I have an ETL process that populates HISTORY tables in a DeltaTrack pattern. In the Proc, there's an UPDATE to the HISTORY table which the query engine is using a ...
Geezer's user avatar
  • 431
0 votes
1 answer
20 views

Partions on a partitioned table getting created with the same partition number in Azure SQL database

I am creating a table with partitioning logic. Below is the partition function and scheme: DECLARE @StartDate datetime2 = '20230401'; DECLARE @YearlyQuartersPartitionFunction nvarchar(max) = N'CREATE ...
Akhilesh's user avatar
-4 votes
2 answers
288 views

Calculate total_worker_time in minutes [closed]

I have an easy query which can show me the top 10 elapsed time by query_plan_hash and query_hash: PRINT '-- top 10 elapsed time by query_plan_hash and query_hash --' SELECT TOP 10 query_plan_hash ...
Francesco Mantovani's user avatar
0 votes
2 answers
177 views

DATE Constraint is ignored on insert

I must be missing something somewhere.. Azure SQL DispatchedOn is a DateTime column ALTER TABLE [table] WITH CHECK ADD CONSTRAINT [CK_ReportDate6MonthRollGreater] CHECK ((CONVERT([date],[...
tbasallo's user avatar
  • 177
0 votes
1 answer
241 views

How to optimize the SQL query which uses cte, group by and run for 23 hours?

I have a query which first performs joins inside cte and then based on cte join with other table and perform group by with some aggregations and get the top 15 records. This query is taking 23 hours ...
Python coder's user avatar
0 votes
1 answer
34 views

How to get access to this server?

I'm a total newbie with data analysis background. Today I was passed on this information as in the image below to remotely get access to a database, which I don't know what app it uses. Can you take a ...
NonSleeper's user avatar
-1 votes
2 answers
175 views

Data retrieving is taking more than 4hrs to fetch 400K records

I have a table with 15 million rows, it's a parent table with 12 child tables. Even for a simple count query, it is taking hour's to complete. select count(1) from table where col_filter >= 'number'...
Python coder's user avatar
-3 votes
1 answer
71 views

Shortcutting/Clowning/Virtualising Azure SQL Database Bulk Loads

I'm currently working on a solution to bulk load (almost) structured data into an Azure SQL Database. The long term plan is to use ADF, but the client is keen to have some static data loaded early in ...
Vocoder's user avatar
  • 117
0 votes
1 answer
46 views

Is it good for performance if multiple full text indexes of SQL Server are connected to one full text catalog?

Now my situation is as follows. A table called APPR_DOC_MASTER was created to service multiple customers, and this table was created as a separate table by dividing it into schemas for each customer. ...
jihunSun's user avatar
0 votes
1 answer
220 views

Procedure to clone a schema in SQL Server

On Azure SQL, we use schema-based multitenancy. To add a new tenant, we want to copy a schema that acts as a template for a new tenant schema. What is the easiest way to clone a schema, incl. the data?...
Simon Martinelli's user avatar

1
2 3 4 5
20