Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [azure-sql-database-v12]

The latest version of Azure SQL Database.

0
votes
1answer
34 views

Overwriting old data in Azure SQL database

I`m currently recieving data from sensor and storing it to Azure SQL database through Azure Stream Analytics job. My question is: how can I overwrite old data from sensor with new data? Sensor has ...
3
votes
1answer
114 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' ...
0
votes
1answer
26 views

Optimize query plan when your results are either a few rows or hundreds of rows?

The most frequent query typically uses a variable that has hundreds of rows, but also runs often with a variable that has only a few rows (it's always one or the other, nothing in between). SQL ...
0
votes
0answers
41 views

Azure MariaDB log_bin_trust_function_creators

I'm testing AzureDB for MariaDB and for my DB to work properly I must change log_bin_trust_function_creators variabl. However, it isn't available in Azure Portal Server Parameters. I've checked and ...
1
vote
1answer
36 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. ...
0
votes
0answers
20 views

Querying AzureAD group membership from inside of SQL DB

If a user connects to a SQL DB with their Azure AD credentials, is there any way that the uses Azure AD data can be queried from inside of T-SQL
1
vote
3answers
162 views

azure sql - create index, does DB have to be offline?

New to Azure SQL. Simple example to ask question. Table Cars. Want to add an non clustered index to Cars table. Takes a long time, say 30 min during staging test deploy. When upgrading production ...
5
votes
1answer
351 views

Read Committed Snapshot, stale data reads?

I'm running SQL Azure and I have a following case. I have two transactions W (writer) and R (reader). Both are running with RCSI (.net application with TransactionScopes using LTM). The R transaction ...
4
votes
1answer
239 views

What is the persistent_version_store table?

What is the purpose of the MS Shipped table: sys.persistent_version_store? Why do I want to know Primarily curiosity, partly because it may relate to an issue waiting to bite us... We're running a ...
1
vote
1answer
51 views

Is it good practice to have relationship between the tenant table and all other tables in a multi tenant application?

I am developing a multi tenant SaaS that uses Azure SQL for data storage. I make use of sp_set_session_context to make sure that any query only touches records relevant to the current tenant. I ...
0
votes
2answers
813 views

set compatibility mode in Azure Sql Database?

Is it possible to set compatibility mode in Azure Sql Database to match SQL Server 2014 ? We have a existing application using SQL Server 2014 - can i just change the connection string to point to ...
1
vote
1answer
44 views

best way to migrate a database? [closed]

I currently have a on-premise SQL Server 2014 High-Availability cluster. I will setup a active geo-replication/auto failover group in Azure. I need to do a one-time data migration---Should I use Azure ...
1
vote
2answers
845 views

Delete query uses 100% CPU with in Azure SQL Database

I have a relatively small database, maybe a few hundred thousand rows, and we have a stored procedure that is meant to clear out a 'Dealer' (the application aggregate root) and all of it's related ...
0
votes
2answers
314 views

Import bacpac from SQL Azure into local server fails.

We are trying to import a bacpac into a local SQL 2017 instance but it gives the following error. This suddenly started happening, previously we didn't have any problem with it so I can't think of any ...
0
votes
1answer
228 views

Inserts and updates request an Sch-M lock

I have a set of Azure applications for an OLTP-type system whose backing store is an Azure SQL database. One of the applications receives messages from an external system, parses out the data, and ...
2
votes
1answer
4k views

Grant View Server State - is it possible for a none SA user to have in Azure SQL?

I'm trying to set up some scheduled jobs which will collect some server stats, using system DMV's in SQL Server Azure. If a none SA users uses 'sys.dm_os_schedulers', they get an error (below), query ...
0
votes
0answers
31 views

Scheduler Current Tasks - Is 92 too high?

When I run the following query on my Azure SQL database: SELECT scheduler_id, cpu_id, current_tasks_count, work_queue_count, runnable_tasks_count, ...
3
votes
2answers
710 views

LOG_RATE_GOVERNOR Wait Stat

I'm noticing this wait stat on my Azure SQL database, and I've never seen it before. I've tried Googling this wait stat but haven't been able to come up with any good information on what this is, ...
0
votes
1answer
412 views

Determine databases specified Login has access to on SQL Azure

I need to obtain a list of all the databases a specific user has access to. To this end I am using the following ... USE master; GO EXECUTE AS LOGIN = N'Login-I-Want-To-Check'; GO SELECT name ,...
1
vote
1answer
27 views

What Permissions Are Needed for Selecting Data and Viewing All Schema?

I'm attempting to create a role in Azure SQL such that the user can perform Select operations, view all schema (but not modify schema) but not perform any writes or execute stored procs. Granting a ...
7
votes
1answer
2k views

SELECT COUNT(*) on a view is orders of magnitude slower than SELECT * on the same view

The View CREATE VIEW [dbo].[vProductList] WITH SCHEMABINDING AS SELECT p.[Id] ,p.[Name] ,price.[Value] as CalculatedPrice ,orders.[Value] as OrdersWithThisProduct FROM ...
0
votes
1answer
294 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
84 views

sql azure: trigger error when inserting into temp table from inserted table

I have a trigger on a sql azure table I am trying to set up. Bear with me as this is one of my first triggers. This trigger is supposed to track all changes to the table in an audit table. As I ...
6
votes
2answers
1k views

Why would I not run “index reorganization” regularly?

I tried index reorganization queries several times so far. They look like this: ALTER INDEX ALL ON TableName REORGANIZE Such query may take hours but it looks like it doesn't interfere with other ...
2
votes
1answer
99 views

Azure SQL - Server login vs. database login

In my Azure SQL server, I see the SQL login that allows me to connect to the server. However, when I look at the Users defined for my database on that server, I don't see a user account with the same ...
14
votes
4answers
1k views

Why does TSQL return the wrong value for POWER(2.,64.)?

select POWER(2.,64.) returns 18446744073709552000 instead of 18446744073709551616. It seems to have only 16 digits of precision (rounding the 17th). Even making the precision explicit select power(...
5
votes
1answer
438 views

Why does a WHERE clause with an indexed, computed datetime column on an indexed view seek the clustered index on the original table

First, sorry for the long title. The setup I reduced the example to the minimum, to make it clearer, so there is no meaningful semantic anymore. DBMS: Azure SQL Database V12. Assume there is ...
4
votes
1answer
604 views

Cannot restore azure database to local due to missing master key

I create a bacpac from azure and restore to my local on-prem server. However, it throws an error like “Please create a master key in the database or open the master key in the session before ...
0
votes
2answers
38 views

Maximizing Availability on a Table When Changing Data Type

I'm looking for some advice on the best way to change the data type on a column from an INT to a BIGINT on a table with 220 million rows, as it has reached the upper limit of the INT data type. The ...
1
vote
1answer
151 views

How can you view the Query Store settings for a database?

I see that you can use notion like the following to set the query store configuration: ALTER DATABASE <database name> SET QUERY_STORE (SIZE_BASED_CLEANUP_MODE = AUTO); But how can I ...
2
votes
2answers
174 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 ...
0
votes
1answer
498 views

Azure SQL Databases hit cpu limits too quickly

Background in a nutshell: - We have a SAAS solution with the following main components. 1. We have a web-portal back-end where administrators can edit data. 2. We have a web API that is called by ...
1
vote
1answer
678 views

Azure SQL very slow INSERT in stored procedure [closed]

I have the following stored procedure, inserting new rows in a join table: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[InsertNewRows] @PropertyId int, @...
0
votes
1answer
360 views

What are options for Bi-Directional Replication of SQL Azure Database

This questions came from a developer friend who is working with SQL Azure Database. Scenario: There are two Azure DB servers, one in North America, USA region and another one in South East Asia ...
4
votes
1answer
2k 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; ...
4
votes
2answers
3k views

Azuredb The database 'tempdb' has reached its size quota

We are runnig a V12 Azure Database instance on the S3 tier. There is still about 100GB of a free space on the database. When loading 85MB XML file with SSIS running on a different non azure SQL server,...
0
votes
1answer
375 views

Setup Managed Backup failure

I am trying to setup Managed Backup (in Azure SQL) using SQLServer 2014 (Ent 64bit) and it is failing. I have the credential created with Identity as the Storage account name and Password set with ...
0
votes
1answer
556 views

Index maintenance Azure SQL

I have installed Ola's scripts: https://ola.hallengren.com/scripts/CommandLog.sql https://ola.hallengren.com/scripts/CommandExecute.sql https://ola.hallengren.com/scripts/IndexOptimize.sql and ran: ...
1
vote
1answer
154 views

Replace all rows in a table based on date

I need to copy the values from a staging table into a production table in SQL Azure V12, considering the following rule: I need to replace all rows for a given day (see datefield column) in the ...
6
votes
3answers
12k views

“login failed for user ” on SQL Azure from azure hosted web application

I have an Azure ASP.net MVC web application which uses a SQL Azure db. It was working fine for some months (someday for some reason Azure changed the name of the server and I had to set that again but ...
21
votes
1answer
1k views

Where do this Constant Scan and Left Outer Join come from in a trivial SELECT query plan?

I have this table: CREATE TABLE [dbo].[Accounts] ( [AccountId] UNIQUEIDENTIFIER UNIQUE NOT NULL DEFAULT NEWID(), -- WHATEVER other columns ); GO CREATE UNIQUE CLUSTERED INDEX [AccountsIndex] ...
1
vote
0answers
146 views

How would I access a system view in SQL Azure master database without logging into master?

My service needs to periodically read sys.resource_stats which is only in "master" database of SQL Azure server. The service currently only accesses a "regular" database in the same server. Accessing "...
2
votes
0answers
418 views

Unable to use select top N shortcut on Azure SQL Database via SSMS

Yesterday morning I was able to query my Azure databases via SSMS and the Select Top N menu shortcut. That afternoon I received a couple of alerts that my web applications couldn't connect to the ...
1
vote
2answers
2k views

Azure SQL Database “Login failed for user” contained users.

I'm having a similar issue to this question (https://dba.stackexchange.com/posts/123094/edit)! I have followed the following article: https://azure.microsoft.com/en-gb/documentation/articles/sql-...
13
votes
4answers
22k views

Azure SQL Database “Login failed for user” in application, but works fine in SSMS

I wanted to try out the contained database users feature on Azure SQL Database V12, but I'm having a problem authenticating that seems odd to me. I created a database called Classifier. I added my ...