A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
23 views

SQL stored procedure to produce custom XML text

I have around 30 tables from which I need to generate a specific XML format, which is consistent through the tables. With my current solution I have a stored procedure for each 30 tables where I do: ...
0
votes
1answer
15 views

How to create multiple azure sql database in an elastic pool using powershell script?

I want to create a sql server and deploy the elastic pool on that server. Then create multiple azure sql database in that elastic pool using powershell script.
0
votes
1answer
21 views

How does CALs Licenses work with Azure SQL

I looked all over the web for concrete information regarding CALs licenses in Azure SQL but couldn't find much event on Microsoft Azure site. Is this included within subscription ? Or Is it part of ...
0
votes
2answers
26 views

Alter role shows role does not exists

Running alter role db_ddladmin add member sqlloginname gives the error message: Cannot alter the role 'db_ddladmin' because it does not exist or you do not have permission. This statement I am ...
3
votes
3answers
233 views

How to create a JOB for Azure SQL?

I'm trying to create some jobs for our Azure servers (for sql databases). I'm reading about it on the internet and tried to find some questiosn here with no success. Theres a link saying I need to ...
1
vote
1answer
33 views

Stored procedure to set value to a column must accept returned values from functions

I created a very simple table in Data Mart to store ETL diagnostic information: CREATE TABLE [internal].[etl_status] ( [property_name] VARCHAR(100) NOT NULL PRIMARY KEY, [property_value] ...
1
vote
1answer
29 views

Copy Azure Hyperscale DB

I show there was a question since 1 year ago with no answer. I have the same question now, in this new year 2020. I need to copy an Hyperscale DB to another server in the same region/location, (the ...
0
votes
2answers
28 views

Installation and shell to move physical and logical SQL Server in azure IaaS VM

Firts of all excuse my english is not my primary language. We are creating an azure template to deploy an IaaS machine with disks C and D with windows server, and the idea is also deploy an ...
1
vote
3answers
33 views

How to quantify or locate command timeouts in Azure SQL

I am trying to if confirm query timeout in Azure. Our frontdoor is reporting a 503 response at 30 Seconds response, as its the SQL server default value, I am trying to confirm if these are indeed ...
0
votes
0answers
29 views

How to configure transactional replication for managed instance as a publisher and a subscriber for two different sql server at the same time?

The scenario is such that a subscriber is subscribed to transaction replication based publisher (distributor running on publisher). I then want this subscriber to be a publisher to another subscriber....
0
votes
0answers
21 views

What happens to the transactional replication if azure sql Vm(publisher and distributor) is stopped and restarted from portal?

I am a newbie...I have azure sql vm and sql managed instance. I have setup transactional replication between them. Now if I stop the vm from the portal will the replication still continue after ...
1
vote
0answers
11 views

Elastic queries with encrypted columns in tables using symmetric keys

I have elastic queries running cross-subscription for everything except tables with encryption. Now I need to tackle tables that are encrypted. How (if at all possible) do I open the keys on the ...
0
votes
2answers
39 views

Copy SQL database with encryption from one Azure subscription to another

I need to copy an entire Azure SQL Database from one subscription to another. The challenge I have is that it has a certificate with symmetrical key and if I try to export it to a .bacpac file I get ...
0
votes
0answers
41 views

Can you update statistics on a sys change tracking table

I'm tracking down some poor query times doing the typical query to get changed records: select StoreItemId from changetable(changes [dbo].[StoreItem], @clientChangeTrackingVs) as ChangedRow where [...
0
votes
1answer
35 views

What are the downsides of using varbinary[max]?

I want to set up a table to store waveform data from an oscilloscope. The table would have a column of varbinary[max] because the waveform data from the scope is returned as a binary sequence that ...
0
votes
2answers
47 views

what are the best ways to sync two databases in sql server or azure sql db?

I have a question like syncing two different databases available on two different servers/instances. lets say Source be the source server and sourcedb is the source database. destinationdb is the ...
0
votes
1answer
41 views

How to create a master key on the master database?What are the roles required to GRANT to the login and user of the master db for the same?

I am trying to create a master key on a master database of my azure sql datawarehouse. But my user does not have required permissions to do so. What are the roles need to be assigned/granted to the ...
0
votes
1answer
21 views

Login failed for newly created user

I just created my first database yesterday. It is now set up and I can write to it from my C# application using the admin user login. I would now like to use a limited write only user so my admin ...
0
votes
1answer
59 views

Sql server/azure connection string parameter for readonly access?

Is there a specific parameter that can be used in a SQL server/azure connection string to specify that the connection should be readonly? In other words, only SELECT queries should work but INSERT/...
2
votes
0answers
37 views

When sys.dm_db_index_usage_stats is cleared in Azure SQL Database

In my solution I need to check when there where some last change done in table/index to determine data freshness. I'm using Azure SQL Database and the best option (and maybe the only one without ...
2
votes
1answer
22 views

Importing a single large table in Azure

I have an existing DB called MyDb in Azure SQL Server. I have a bacpac of another DB with several tables in it. I'm interested in importing one single table (that table has no FK, it makes things ...
0
votes
0answers
24 views

Indexes not appearing in sys tables on Azure Secondary

I'm running the following query on an AZure SQL Read Only secondary to determine which indexes are being used. But some of the indexes are not being returned in the query. I must be missing something ...
1
vote
1answer
26 views

Azure SQL Database vs. error 8152 enhancement

How can I take advantage of the enhancement for error 8152 (https://blogs.msdn.microsoft.com/sql_server_team/string-or-binary-data-would-be-truncated-replacing-the-infamous-error-8152/) in Azure SQL ...
0
votes
1answer
19 views

SQL Server Full-text search for keywords without prefix matching

I have the following text in my NVARCHAR column "Ich bin eine SuperbProdukt" I have a full-text search enabled on the column and I can search for it by executing the following query that I wrote :...
3
votes
2answers
226 views

Rolling back truncate table

I have a stored procedure that does the following: BEGIN TRANSACTION -- Code to delete updated records from production (dbo) table DELETE FROM [dbo].[factMyTable] WHERE exists (SELECT * ...
0
votes
1answer
20 views

Change Azure Standard to Premium

I have one application using SQL Server Standard and would like the change to Premium, but I need to understand about the DTU. The application reaches 100% in DTU every day. Would talk know if I need ...
1
vote
1answer
32 views

Difference between SQL Server Azure and SQL Server 200x

I'm a SQL Server DBA and I can understand the logic behind logins users roles and etc ( login for server access, user for databases and etc ). I've asked some questions here but I think I need to ...
0
votes
0answers
48 views

Question about data type to hold large number

I have a line of data that store on Microsft SQL Server 13.0.4 in numeric(32,16). It looks like this 9642327391274.0000000000000000 I try to migrate that database table to another on Azure SQL ...
1
vote
1answer
47 views

Login failed for user when trying to connect to Azure Postgre database from MSSMS [closed]

I created a database on Azure but can't log to it with MSSMS. I always have the Error 18456 even if I followed this tutorial. TITLE: Connect to Server ------------------------------ Cannot connect ...
0
votes
1answer
30 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 ...
0
votes
2answers
36 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 ...
1
vote
2answers
122 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 ...
1
vote
1answer
70 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 ...
2
votes
0answers
279 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 ...
0
votes
1answer
60 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
vote
2answers
97 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 ...
2
votes
1answer
68 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.
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
61 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
2answers
111 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
58 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 ...
1
vote
1answer
63 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 ...
0
votes
0answers
26 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 ...
0
votes
0answers
71 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 ...
0
votes
1answer
40 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
14 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
140 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 ...
1
vote
2answers
46 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 ...