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
1 vote
1 answer
22 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
  • 11
0 votes
0 answers
32 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
-1 votes
2 answers
72 views

Economical options for long term storage of MS SQL Reporting Data (Currently in Azure SQL) [closed]

We have a reporting database in Azure SQL that is passing 3TB and we need to decide what to do before we reach the 4TB limit. Azure Hyperscale SQL is not feasible as the storage cost is more than ...
nobodyofnaught's user avatar
0 votes
0 answers
78 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
  • 109
0 votes
1 answer
44 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
16 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
-1 votes
0 answers
10 views

Need to connect to my Azure Database

I have youtubed and googled how to connect to my Azure database but I have not found a reliable source. Perhaps I dont even know what excatly I need to get the job done. Let me explain here what I ...
Leo Torres's user avatar
0 votes
0 answers
31 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
58 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
71 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
71 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
53 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
70 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
23 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
78 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
19 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
33 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
50 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
33 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
27 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
47 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
142 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
107 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
65 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
35 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
98 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
101 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
888 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
135 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
96 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
79 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
389 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
  • 441
0 votes
1 answer
17 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
226 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
144 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
221 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
164 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
39 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
183 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
0 votes
0 answers
595 views

Sometimes simple queries are slow, high buffer IO wait times the cause?

I have a Azure SQL database, Premium P2: 250 DTUs, using 250GB of storage. Sometimes even simple queries runs slow, for example by getting a single row from a simple 300mb table with with 500k rows, ...
viblo's user avatar
  • 479
5 votes
1 answer
179 views

Is there some fundamental reason that TransactionScope does not work as expected?

For the following code... using System.Transactions; using Microsoft.Data.SqlClient; var connectionString = "..."; using (var scope = new TransactionScope(TransactionScopeOption....
Martin Smith's user avatar
  • 84.4k
-1 votes
1 answer
130 views

Azure DB - Converting Base64 Encoded into Binary Found in Databricks Python

I am going nuts on this. We have a base64 encoded value: "+G1mQl3A30MKQsCBxMXwyMOc/AZEvpcRRI13mUOy3SNDEFjyQuVQ0UKHFsdCJ/HCQqEvuEE5Lb5AAg==" We needed decoded to binary. In python (databricks)...
Davik2001's user avatar
0 votes
2 answers
75 views

Moving tables to different database within same sql server

There is a SQL server, there are around 100 databases in it. I have to query a few tables from one of the databases. when I query, it's very slow and I think CPU utilization is very high at that time. ...
Vivek Nuna's user avatar
1 vote
1 answer
65 views

Can I develop a Dashboard Report for Data Allocated vs Max Storage for my Azure Database?

I have an Azure SQL Server Database - Managed Instance I'd like to monitor. Here is the widget that Azure shows me on the database summary page. I'd like to put this widget, or at least the ...
Yossi Geretz's user avatar
1 vote
0 answers
52 views

Getting a SORT operator when number of rows being updated is above a threshold [duplicate]

I'm working a table that has VARCHAR(18) as the PK. I'm putting this here in case it's significant. We have a SP that runs as part of an ETL that updates X rows each time. I've noticed that when the ...
Geezer's user avatar
  • 441
0 votes
1 answer
64 views

How can I copy a database in Azure SQL Server to Azure SQL Managed Instance in different Azure Subscription

I created an Azure SQL managed instance using terraform in Azure Subscription A. I am trying to copy the databases in an existing Azure SQL Server in Subscription B to the SQL Managed Instances I ...
achustle's user avatar

1
2 3 4 5
20