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
3
votes
3answers
3k views

SQLCMD: “Login failed for user” on SQL Azure, but it works with SSMS

I have an SQL Azure database, and I'm able to connect to it using SQL Server Management Studio. When connecting to it, it displays myServer.database.windows.net (SQL Server 12.0.2000.8 - myUser) ...
2
votes
3answers
367 views

Why does PK constraint require a separate index when I already have a suitable unique clustered index?

This is part of table definition from here: CREATE TABLE [dbo].[JobItems] ( [ItemId] UNIQUEIDENTIFIER NOT NULL, -- lots of other columns CONSTRAINT [PrimaryKey_GUID_HERE] PRIMARY KEY ...
2
votes
2answers
15k views

TSQL Copy an existing database

I am learning how to administrate MS Sql server 2012, come cross a question and its suggested solution for copying an existing database for different name. Administer a windows azure sql database ...
2
votes
1answer
4k views

Transactional Replication from SQL Server to Azure SQL

I'm attempting to setup transactional replication between an on-premises SQL Server and an Azure SQL database. Unfortunately, it looks like Azure SQL doesn't support SQL Server Replication, and Azure ...
2
votes
1answer
4k views

SQL Server credentials - Maximum Password size

What's the maximum password size I can get on SQL Server 2012/2014? I was unable to find this information online. I mean SQL Server credentials itself, not passwords inside tables. Thanks a lot
2
votes
2answers
759 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
2answers
1k views

Dynamic SQL Query with Paging, Performance and Optimization

I have an interesting problem in front of me. There is a database with ~1 million user accounts with an anticipated growth of 1-2 million per year. The database is strongly TPT but this particular ...
2
votes
1answer
123 views

Understanding performance of highly unique WHERE clauses

I've been struggling to understand how to deal with a specific type of performance issue that shows up very often in this scenario: when you are wanting to apply multiple filters in a query, but you ...
2
votes
2answers
141 views

Azure elastic pool: Can I create as many databases as I want?

I am sitting here trying to figure out what the elastic pool in Azure gives me. I have a customer that wants a guess on pricing if they move to Azure. They have 3 databases, on a server. The server ...
2
votes
2answers
2k views

Is it possible to log ship from on-premise SQL server to Azure SQL Managed Instance?

From the docs, it would seem that restoring a full database backup file is possible, but can one also restore transaction logs? (the idea is to minimize downtime in a migration from on-prem to MI). ...
2
votes
1answer
86 views

Can an application connect to databases from on-premise SQL Server Instance and Azure SQL together?

Can a single application connect to two different databases each of which is in different Instances. One instance has on-premise deployment, the other one is Azure SQL(not SQL in Azure VM). So ...
2
votes
2answers
539 views

Determine whether there is any blocking while deleting large number of records [closed]

I would like to know whether there is any way to determine why it is taking too much time say 3 minutes for deleting 50K records from a database hosted in Sql Azure. I have clustered index on primary ...
2
votes
1answer
2k views

Index rebuild log growth

How much log index rebuild will generate.I remebered reading rebuild index should generate same amount of log file as table size.But my tests are showing otherwise.We need this estimate since we are ...
2
votes
1answer
1k views

Rebuilding Unique Index with uniqueidentifier in SQL Azure never succeeds

We have a number of tables (~1M records) that have a column on them defined as: [GlobalID] [uniqueidentifier] NOT NULL that gets auto-populated with newid(). We use this ID for synchronizing data ...
2
votes
2answers
703 views

Restore DIfferential backup on azure managed instance?

I am migrating my database from on-premise to Azure managed instance. In order to move the database I'm using the organization weekly full backup, and I am asking them to take a diff after they take ...
2
votes
1answer
3k 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...
2
votes
1answer
402 views

Difference between Clustered Columnstore Index Table in Azure SQL and Table in Azure Data Warehouse

What is the essential difference between a Clustered Columnstore Index table in Regular Azure SQL, and a table in Azure Data Warehouse? They both have columnar storage, no foreign keys, no primary ...
2
votes
1answer
1k views

GRANT select on function FN_DUMP_DBLOG in SQL Server without GRANTing sysadmin

I'm trying to GRANT permission for an SQL login to access the functions fn_db_log and fn_dump_dblog but GRANTing SELECT on the function still fails with error: Msg 9010, Level 14, State 1, Line 3 ...
2
votes
2answers
259 views

Get x random rows from SQL Server

I have read this question: What is the best way to get a random ordering? and can do a select top 4 from tabel order by NEWID() but I need it per category. So I need 1 row from category A, 1 row from ...
2
votes
2answers
548 views

How to move snapshot Azure SQL db from prod to dev on a recurring basis

How can I take an existing production Azure SQL database (or one of its regular backups) and restore it to a dev environment on a regular basis? I want to give developers the option to work on their ...
2
votes
1answer
5k views

How to reclaim database space on Azure SQL Server after setting nvarchar values to null [duplicate]

There is db space challenge at hand on Azure SQL Server database. 490 GB out of 500 GB is used. That's what I read from nice pie chart on Azure portal. Notice that some of the techniques used on-prem ...
2
votes
2answers
3k views

Query runs slowly when a non-indexed column is added to the WHERE clause

My SQL Server houses a logs table that has 4 columns: RowID - GUID PRIMARY KEY OperationID - GUID (NONUNIQUE INDEXED) Line - INT Message VARCHAR(250) Some table facts: An operation may have ...
2
votes
1answer
3k views

Get sql azure dead lock info

My application has been logging dead lock exceptions return from sql azure to my .net application: Transaction (Process ID 152) was deadlocked on lock resources with another process.... I would like ...
2
votes
3answers
1k views

Undo SQL UPDATE Azure DB

I have accidentally updated over 3,000 records in one of my tables hosted on Azure. This was not a transaction and I did not have any back ups for this table. I've read around and found ApexSQL Log ...
2
votes
2answers
197 views

Workflow for SQL Server + Azure SQL development?

Lets assume the following: 5 devs all working on laptops Each develops/debugs on Azure compute emulator (code) and SQL Server (db) - both running locally on their laptops. I'd like to have These ...
2
votes
1answer
189 views

Why is my recursive CTE so much slower on Azure SQL?

I have this simple recursive CTE for a hierarchy of folders and their paths: WITH paths AS ( SELECT Id, ParentId, Name AS [Path] FROM Folders WHERE ParentId IS NULL UNION ALL SELECT ...
2
votes
1answer
870 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 ...
2
votes
1answer
1k 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 ...
2
votes
1answer
1k views

Importing BACPAC file from azure to SQL creating an empty database

Exported Data-Tier_application from an Azure database to create a BACPAC of it. SQL editions I'm trying to use to import the BACPAC: SQL Server 2016 express. SQL Server 2017 Developer ...
2
votes
1answer
153 views

Make database writeable (Azure MS Sql)

I have a bacpac file from a read-only database hosted on Azure. When imported to a new server the database is also read-only. I’ve tried looking for answers with no luck. How can I change it to a ...
2
votes
1answer
243 views

Is it possible to force an adaptive join with a query hint?

Is it possible to force a query to use an adaptive join? The query in question produces an adaptive join when run as a SELECT, but when run as SELECT INTO instead, it doesn't. I have a parameterised ...
2
votes
1answer
88 views

Does Batch Mode only apply to Agg Functions on ColumnStore Index

Azure SQL Database - Standard Edition (S3 Service Tier) Why does Batch Mode only come into effect when using Aggregate Functions? DROP TABLE IF EXISTS dbo.TransCS CREATE TABLE dbo.TransCS ( ...
2
votes
1answer
897 views

Migrate on-premise SQL Server databases to Azure SQL Database

We're in the process of a server migration from an on-premise server (Win2008R2) to Azure PaaS. To move the databases, we used the Microsoft Data Migration Assistant (DMA) tool, which worked great ...
2
votes
2answers
695 views

How to Limit DTU Percentage Consumption for a Given Session in Azure SQL Database?

We have an Azure SQL Database tier S4 (200 DTU), and there is one big table inside When I run a "alter index rebuild..." statement, it takes about 18 mins to complete This particular nonclustered ...
2
votes
2answers
498 views

From Azure-DTU to regular machine

There's a way to calculate how many DTU's a given regular server outputs, but i need the other way around! I'm planning on leaving the azure environment, and I need a way to measure how much CPU/...
2
votes
1answer
151 views

DB Index Maintenance

I have a database which has almost 130 tables. I am using the Ola Hallengren maintenance solution and IndexOptimize scripts. I have two tables in particular that in my opinion needs to be better ...
2
votes
1answer
1k views

Azure SQL Data Migration Assistant is Stuck on “Migrate Data”

I am in the process of using the Data Migration Assistant to move a local DB to Aszure SQL. The schema transfer went well, and 243 of the 246 tables all were able to transfer their data with no ...
2
votes
2answers
1k views

“Login failed for user” when using admin user in SSMS [closed]

I am trying to connect to an Azure SQL database via SSMS. The connection string supplied by Azure is: Server=tcp:SERVER_NAME.database.windows.net,1433;Initial Catalog=DATABASE_NAME;Persist Security ...
2
votes
1answer
391 views

Can I change which index a primary key uses?

I have a table with a non-clustered index on the id, and a clustered index on some other fields. The fields of the clustered index are non-sequential, and are frequently modified. I'd like to change ...
2
votes
1answer
206 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 ...
2
votes
2answers
1k views

OFFSET X ROWS FETCH NEXT 50 ROWS ONLY not using indexes

I have a query that is using OFFSET X ROWS FETCH NEXT 50 ROWS ONLY. If X is 160745 it uses the index, if X is 160746 it does not. There are more than 400000 records. With the index, it takes about 2 ...
2
votes
2answers
5k views

Replication Access denied in Replication

I have a database on-prem, and I have an Azure account. I need to establish transactional replication from the on-prem to Azure. First of all I created a publication and after that I made a ...
2
votes
2answers
100 views

Ideal settings for “read only” table

I'm building an application where a certain group of programmatically-created Azure SQL Server tables will only ever be read from. The app will create a new table, insert a bunch of data, and then ...
2
votes
1answer
327 views

Extracting DDL Events for a database on Azure

I have been trying to extract DDL changes from SQL Server via Extended Events, we needed to know the type of change and the user who made the change. We wanted to avoid the use of triggers where ...
2
votes
2answers
3k views

Add MS SQL Server to virtual machine in Azure

I'm trying to get TDE in Azure. I read that it's possible only on a virtual machine. I built the virtual box, but didn't add SQL Server when it was created. Can I just install SQL or will I have to ...
2
votes
2answers
891 views

Reorganize Indexes T-SQL

I'm moving a database to SQL Azure and with that I lose the maintenance plans so I am going to use a Worker Role to schedule them. When I open the properties of the Rebuild Index Task and click on ...
2
votes
3answers
3k views

Is it OK to create hundreds of databases in SQL Azure versus one big one and run the risk of deadlocking

I need to create highly scalable solution - where field devices in thousands of sites are delivering data in real time to a back end system, and SQL Azure seems to fit the bill nicely in terms of ...
2
votes
1answer
51 views

Dynamic Data Masking Doesn't Seem To Work Correctly With ISNULL

Here is the code to reproduce the issue: CREATE TABLE [dbo].[EmployeeDataMasking]( [RowId] [int] IDENTITY(1,1) NOT NULL, [EmployeeId] [int] NULL, [LastName] [varchar](50) MASKED WITH (...
2
votes
1answer
62 views

Optimization of a query to retrieve records randomly with multiple joins and filters

I have the following schema: This question was posted also in StackOverflow, but I want to consult also to specialists more focused on DB administration because the nature of my project. Sorry if ...
2
votes
1answer
64 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 ...

1
3 4
5
6 7
15