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
1answer
26 views

deleting small number of rows hangs in tsql database

So I'm just trying to delete some bad data from a one of our test databases. I've identified the rows to be deleted, and have written a simple query to handle this. However, when run, the query ...
5
votes
3answers
670 views

SSMS can't connect to Azure database

I got a new Windows 10 machine and installed the latest version of SQLEXPRESS and then the latest version of SSMS (17.9.1). When trying to connect to my Azure database, I'm getting the following ...
2
votes
1answer
802 views

Managed Instance Restart

Does anyone know how to restart a SQL Server Managed Instance? The stop / start / reset are all grayed out, so that’s really. It an option. Any thoughts? Thanks...
1
vote
2answers
30 views

How do you get the default compatibility level in Azure SQL Database from T-SQL?

In on-prem SQL Server you can check the server version and multiply by 10 to get the maximum compatibility level supported by the server, or check the compatibility level of the model database to get ...
0
votes
1answer
12 views

How do you detect whether you have permission to query sys.dm_os_performance_counters?

According to the sys.dm_os_performance_counters documentation: On SQL Server, requires VIEW SERVER STATE permission. On SQL Database Premium Tiers, requires the VIEW DATABASE STATE permission ...
5
votes
3answers
234 views

Handle concurrency when insertion depends on reading

[Short] I have the following situation: user A attempts to insert data DA into the database. To check whether user A is allowed to insert DA, I need to run a query and do some computation. The ...
1
vote
1answer
24 views

Azure Sql Serverless Vs Basic Tier [closed]

Does anyone have experience of moving a database from an Azure SQL Basic, or Standard tier, to Serverless? I'm currently investigating whether to do this for our development, UAT and staging ...
3
votes
2answers
886 views

What indexed view capabilities does Azure SQL Database have?

Does Azure SQL Database support indexed views? Does it support automatic indexed view matching without NOEXPAND? Does the answer depend on the pricing tier? I was unable to find definitive answers to ...
2
votes
0answers
66 views

RequestError: Connection lost - read ECONNRESET

I am new to Microsoft SQL Server, please advise. I am receiving the following error message when I deploy code into my development environment (which is hosted on Azure using Node.js (version 10) and ...
2
votes
1answer
588 views

How to troubleshoot “BCP copy in failed”

I have a table that looks something like this in a SQL server database in Azure: CREATE TABLE [dbo].[TableName]( [col01] [int] IDENTITY(1,1) NOT NULL, [col02] [varchar](255) NOT NULL, [col03] [...
-1
votes
1answer
384 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
2answers
62 views

Azure SQL Server Trigger Not Firing

Using Azure SQL Server, on a managed instance (i.e. a single server running multiple databases, where the db in question is one of them). I've created a trigger on INSERT to table A, that performs an ...
0
votes
1answer
31 views

I'm not understanding the concept of login/user on Azure [closed]

So as a SQL Server DBA, I can normally create a user, then inside the database U just create a login pointing to that login and then I give the necessary privileges. I'm trying to understand the ...
-1
votes
1answer
169 views

Assigning Permission on Azure SQL Database

I have an azure SQL Database. I already created a new login and user on the database. Question is i want to assign permission on the said user. Permission that will restrict the user to drop table, ...
2
votes
1answer
36 views

How to determine MAXDOP setting when using DTU in Azure SQL

I have previous experience of setting MAXDOP settings for on premise OLTP & OLAP servers when you know the number of cores at your disposal. e.g. if I knew I had 16 at my disposal I'd set my ...
0
votes
0answers
38 views

Does SQL server support an in-built mechanism to copy a row to a log or history table when it is updated?

Is there an in-built mechanism that copies a row to a log or another table when it is updated. Or is the only option to write a custom trigger on update.
1
vote
0answers
159 views

SSIS: Error from ODBC provider when inserting into Always Encrypted table using CMK in Azure Key Store

I'm trying to use SSIS (Visual Studio 2017) to insert data into an Azure SQL table with a column that's encrypted via Always Encrypted, and a column master key stored in Azure Key Vault, but I keep ...
0
votes
0answers
15 views

Group by with no aggregation expresssion is not supported

I need help i am getting an error to the following query on azure sql. SELECT illuminance as illuminance, temperature as temperature, (select to_char(sysdate,'DD/MM/YYYY HH:MI:SS AM') ...
0
votes
0answers
58 views

How to find the MAXSIZE for user databases from a connection to master in Azure SQL Database?

While it is simple enough to SELECT DATABASEPROPERTYEX(@DatabaseName, 'MaxSizeInBytes') when connected to a user database, I have been unable to find how to get this information for all of the ...
2
votes
1answer
48 views

Azure SQL: Azure SQL Database traffic migration to newer Gateways

I have been assigned a task to look at this: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-gateway-migration. I got an email about it: I have a pretty standard setup, with a Azure ...
2
votes
2answers
60 views

Is DB mail supported on SQL Server hosted on Azure VM (IaaS)?

Is DB mail present in SQL Server hosted on Azure VM (IaaS)? If DB mail is not supported, then what are the features available?
2
votes
1answer
193 views

Developing an Azure Sql Database backup strategy

I know Azure databases are backed up and kept for a retention period, which I believe the default is 30 days. I'd like to come up with a plan to mimic our current strategy with a physical SQL Server ...
1
vote
1answer
21 views

How To Fix High DTU Usage on Specific Query

I have a query that runs every few seconds on a Microsoft SQL Azure Database. It is from a web job that checks if there are actions that need to be done based on rows in a specific table (its a ...
1
vote
2answers
1k views

Powershell Restore Azure SQL Database to local with Restore-Database

I have written a powershell script that uses Start-AzureSqlDatabaseExport & Get-AzureStorageBlob to export my Azure DB to a bacpac and download it locally, the next step is to restore the bacpac ...
0
votes
0answers
24 views

Dynamic script to alter a column type having an index

I am writing a script to update the datatype of a column in SQL Server on a list of tables, if the existing column are not yet of the desired type. The column should be converted from a VARCHAR to a ...
1
vote
1answer
52 views

Azure SQL - dataspace used vs max dataspace

I have a single Azure SQL database in Azure with the following database data space As I read the documentation: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-file-space-management ...
0
votes
0answers
21 views

TCP Provider, error: 40 encountered during a first time usage of Azure Data Studio on macOS Mojave

I've newly installed Azure Data Studio on macOS Mojave and tried to connect to the database which is the first login screen that opens upon opening the application. I've watched videos online ...
1
vote
1answer
28 views

Creating my first Elastic Database Job on Azure

On https://docs.microsoft.com/en-us/azure/sql-database/sql-database-job-automation-overview it says that there is a new replacement for SQL Agent. However, I cannot get it to work. I had problems ...
0
votes
1answer
378 views

Importing a .bacpac from SQL Azure into a local SQL Server 2016 server gives errors

I'm trying to import a .bacpac created from SQL Azure into a SQL Server 2016 server that has no existing databases beforehand. It will run but run into issues such as: Unhandled Exception: ...
0
votes
1answer
33 views

Is a Clustered Index Scan bad for performance?

I have a complex query (see below) which performs badly on a large database. I'm now analyzing the query by removing the joins, look at the actual plan and step by step add the joins back. I see ...
0
votes
0answers
17 views

Find DB principals accessing a table in Azure SQL

My use case is as follows: A table in my database is accessible by application A, B, C, etc each of whom has their own database principal. We want to start limiting the principals that can access ...
0
votes
0answers
13 views

Azure Sql database AAD user not getting created

I need to create an AAD user for a Windows security group that was recently synchronised with Azure AD. This security group has spaces in its name. I am using the below SQL script but it keeps ...
0
votes
0answers
109 views

Import bacpac containing security policies and temporal-tables with schemabinding

I've created a bacpac backup of my database (both Azure and local with SSMS). Trying to import the bacpac to same or another machine (again both Azure and local) the import always fails with this ...
3
votes
1answer
412 views

How to handle failed Index Optimization (Ola Hallengren) step in SQL Azure Elastic Job Agent?

I have created a SQL maintenance job using Azure Elastic Job Agent with the following step: EXEC jobs.sp_add_jobstep @job_name = @jobName, @step_name = 'Optimize indexes and statistics', @command=N' ...
3
votes
2answers
4k views

Creating SQL Azure login for single database

I want to create separate logins for each database we create on a SQL Azure database server which only have read / edit permissions for a single database and do not have drop permissions, and to ...
4
votes
1answer
2k views

Is it possible to use cross database queries in both Azure and SQL Server 2016?

I'm working on a project that is designed to run on Microsoft's Azure platform. At present we have a few developers working locally on their own machines with the intent of being able to publish the ...
0
votes
0answers
45 views

Azure SQL Database Locking/Blocking

Environment: Azure SQL Snapshot Isolation: Off Read Committed Snapshot: On We're currently encountering SQL blocked calls on all tables when running an Update statement, not just the tables being ...
2
votes
1answer
3k views

I keep getting an error 10060 trying to connect object explorer in Visual Studio 2013 to an Azure Database

Using Win 7, Visual Studio 2013, (or Sql management tool 2014) This is for a class and its all software on the trial period. In Visual Studio server explorer - I can connect to the Azure Server I ...
0
votes
1answer
23 views

Can we migrate Azure SQL Database's objects to In-Memory OLTP?

Can we migrate Azure SQL Database's objects to In-Memory OLTP? IF yes then how to perform this step by step?
3
votes
2answers
269 views

Azure SQL cross-database queries returns too many rows with joins

I have a problem with Azure SQL cross-database queries, it looks like if we join data across databases the join is not distributed as input to the external database. Currently I tried to implement a ...
2
votes
1answer
67 views

Is there an Express version of Azure SQL DB?

With on-premise SQL Server, there are editions such as Express, Web, Standard, and Enterprise. Do those editions (or an analog) exist in Azure SQL DB, especially Express? My Google-Fu is failing ...
1
vote
1answer
52 views

How to get EstimatedRows values from SQL Server execution plan nodes

When I execute the following code in an Azure SQL Database (v12) or SQL Server 2016 instance, I get values in the EstimatedRowsRead column, but not in the EstimatedRows column, and I'm not seeing why. ...
7
votes
1answer
1k views

SSIS OLE DB Source Editor Data Access Mode: “SQL command” vs “Table or view”

In BIDS, I'm running a Data Flow Task & I'm wondering what the difference is behind the scenes between using "Table or view" vs "SQL Command" for the Data Access Mode for an OLE DB Source. For ...
2
votes
1answer
81 views

Azure Managed Instance - Is it possible to send Sql Logs To Log Analytics?

Is it possible to stream a Managed Instances SQL logs into log analytics? I need a single location for all Azure based monitoring so that multiple teams have visibility/access to log information for ...
1
vote
1answer
794 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 ...
6
votes
1answer
137 views

Understanding Plan Choice When Query Store Doesn't Respect Forced Plan

I'm trying to figure out a situation that I encountered last week where, in an attempt to temporarily fix a plan regression during an incident, I forced an execution plan using Query Store, but found ...
5
votes
3answers
3k views

CREATE DATABASE AS COPY does not work with Azure

I'm new with T-SQL and MSSQL but need to copy Azure SQL database from one server to another. As I googled here - it can be done with a CREATE DATABASE Database1_copy AS COPY OF server1.Database1; ...
1
vote
0answers
43 views

Remove DTC Support From SQL Server 2016

My application is running in Azure SQL which doesn't support DTC. We only use Azure SQL in upper environments. In the local development environments, we're still using SQL Server 2016. I want to ...
0
votes
0answers
373 views

SSIS packages run locally but not on Azure (possible host name issue?)

I am trying to make SSIS packages using Visual Studio 19 that import data from tables in a remote Azure Managed Instance SQL database to a Microsoft Azure SQL DB database, aiming to schedule these to ...
0
votes
2answers
28 views

Azure Database Link to another Azure database

How to query between two databases with the same server in SQL Database? Currently we are aiming to link two azure databases that will update simultaneously. Thanks!