Questions tagged [azure-sql-database]

Azure SQL Database is a relational PaaS database hosted in Microsoft Azure. Azure SQL Database provides predictable performance, scalability, business continuity, data protection, and near-zero administration for cloud developers.

Azure SQL Database is the cloud-based relational database from Microsoft.

It is very similar to Microsoft SQL Server hosted in a cloud environment but does have some differences and limitations documented listed here

9584 questions
973
votes
25 answers

Reset identity seed after deleting records in SQL Server

I have inserted records into a SQL Server database table. The table had a primary key defined and the auto increment identity seed is set to “Yes”. This is done primarily because in SQL Azure, each table has to have a primary key and identity…
xorpower
  • 17,975
  • 51
  • 129
  • 180
224
votes
24 answers

How do I copy SQL Azure database to my local development server?

Does anyone know how I can copy a SQL Azure database to my development machine? I'd like to stop paying to have a development database in the cloud, but it's the best way to get production data. I copy my production database to a new development…
BZink
  • 7,687
  • 10
  • 37
  • 55
153
votes
7 answers

How to re-create database for Entity Framework?

I have got into a bad state with my ASP.Net MVC 5 project, using Code-First Entity Framework. I don't care about losing data, I just want to be able to start fresh, recreate the database and start using Code-First migrations. Currently I am in a…
Toby Sharp
  • 2,029
  • 3
  • 19
  • 21
145
votes
12 answers

Stopping SQL Azure DB when not in use

Is there any way to stop a SQL Azure DB so that it doesn't charge anything towards our account? I don't want to delete it, just while in testing and it's not being used than we set it to "stopped" like we can do with websites, cloud services, and…
Matt
  • 3,305
  • 11
  • 54
  • 98
137
votes
11 answers

The SELECT permission was denied on the object 'Users', database 'XXX', schema 'dbo'

I moved a database from SQL Server 2012 to Azure. I don't want to use the user master, so I created a user test. This is what I did for database XXX on Azure: create user test from login test with default_schema=[dbo] exec sp_addrolemember…
Old Geezer
  • 14,854
  • 31
  • 111
  • 198
133
votes
6 answers

Azure SQL Database Bacpac Local Restore

I've created a BACPAC backup of my Azure SQL Database using the "Export" option within the Azure Management Console. Having downloaded this to my machine I'm a little stuck on how I can restore this to a local SQL Server instance. I came across the…
Ben Foster
  • 34,340
  • 40
  • 176
  • 285
128
votes
8 answers

Optimal way to concatenate/aggregate strings

I'm finding a way to aggregate strings from different rows into a single row. I'm looking to do this in many different places, so having a function to facilitate this would be nice. I've tried solutions using COALESCE and FOR XML, but they just…
matt
  • 2,857
  • 7
  • 33
  • 58
107
votes
9 answers

Password reset for Azure database

I have a new Azure account. I am able to log into the 'manage' page as admin, but I forgot the password to one of my databases. I would like to reset the password on that one DB. How do I do that? Microsoft doesn't seem to have a KB on that - at…
Yosem
  • 4,685
  • 3
  • 22
  • 29
100
votes
2 answers

How do I change the name of an Azure Resource Group?

After the new model was implemented, all of my websites now belong to individual Resource Groups called "Default-Web-East" and all of my SQL databases belong to individual Resource Groups called "Default-SQL-East". This is confusing to say the…
Jay Mathis
  • 1,145
  • 2
  • 7
  • 9
99
votes
14 answers

Error when connect database continuously

When I am querying from database in continuous looping, after some time I get an error : An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using…
user3928324
  • 991
  • 1
  • 6
  • 6
94
votes
5 answers

Azure SQL Database "DTU percentage" metric

With the new Azure SQL Database tier structure, it seems important to monitor your database "DTU" usage to know whether to upgrade or downgrade to another tier. When reading Azure SQL Database Service Tiers and Performance Levels, it only talks…
Dave New
  • 38,496
  • 59
  • 215
  • 394
94
votes
9 answers

How do I create a new user in a SQL Azure database?

I am trying to use the following template: -- ================================================= -- Create User as DBO template for SQL Azure Database -- ================================================= -- For login
user1679941
87
votes
15 answers

Azure Functions Database Connection String

How do I add or access an app.config file in Azure functions to add a database connection string? If you're not supposed to add an app.config and there is a better way to access an external database to execute the function please let me know best…
Lereveme
  • 1,614
  • 2
  • 15
  • 18
87
votes
3 answers

Where do you set and access run-time configuration parameters per environment for service fabric?

For two environments, local and cloud, how would I set up custom settings or parameters for resources such as Sql databases, storage accounts, etc... Ideally it would be one parameter name called in code to say, point a DbContext towards a…
StampyTurtle
  • 2,728
  • 2
  • 14
  • 16
81
votes
6 answers

New user cannot login to SQL Azure

I am creating a new read/write user on SQL Azure as follows: -- Connected to master create login [fred] with password = 'xxx'; -- Connected to my DB create user [fred] from login fred; EXEC sp_addrolemember 'db_datareader', 'fred'; EXEC…
Sean Kearon
  • 10,987
  • 13
  • 77
  • 93
1
2 3
99 100