azure-sql-database

Azure Functions static SqlConnection - right way to scale?

梦想与她 提交于 2019-12-22 10:34:30
问题 I'm using Azure Functions with queue triggers for part of our workload. The specific function queries the database and this creates problems with scaling since the large concurrent number of function instances pinging the db results in maximum allowed number of Azrue DB connections being hit constantly. This article https://docs.microsoft.com/en-us/azure/azure-functions/manage-connections lists HttpClient as one of those resources that should be made static. Should database access also be

Azure cannot access connection string stored in app service configuration

梦想与她 提交于 2019-12-22 10:20:54
问题 I have an app service in Azure operating as an API for a system I'm designing. As the API is responsible for accessing the database directly, I obviously don't want to be storing connection strings in the source code, so have stored it in the Connection Strings section within the App Service's Configuration on the Azure dashboard. My code is pretty much a carbon copy of this >> https://github.com/medhatelmasry/JwtAuthentication/blob/master/JwtAuthentication/Startup.cs, except I have a check

Using Azure Resource Manager to Copy Azure SQL Databases

醉酒当歌 提交于 2019-12-22 10:20:05
问题 I am currently creating an Environment Deployment Package using ARM and I want to be able copy an existing Azure SQL Database (schema and data) to another Azure SQL Database in a new Resource Group. I created a .bacpac file from the original SQL Database and uploaded it into a Storage Account. I then added a SQL Database Import Resource to my Template and pointed it at the URI of the .bacpac file I created. When I try to run the Deployment, I get this error. A project which specifies

Automated Export Failed

允我心安 提交于 2019-12-22 06:36:10
问题 As admin for an Azure subscription I am getting emails reporting: Automated SQL Export failed for {server:database} at 9/5/2013 12:00:11 AM. The temporary database copy to export from could not be made. I deleted this server, without explicitly removing the automated export configuration. First question: how do I tell Azure to stop trying to do the export? Second question: newbie mistake (if so please let me know what I failed to do) or bug? Thanks! 回答1: I believe that this might be because

Can we recover a deleted server for Azure SQL Database?

有些话、适合烂在心里 提交于 2019-12-22 05:39:10
问题 We accidentally deleted our production server for Azure SQL database (the server, not just a database). How do we recover the server? 回答1: Yes, but you need to open a support ticket - upper right-hand corner in the Azure Portal. 回答2: I've no idea how you deleted the production server, but when you try to delete in the azure portal, it will remind you that deleting server is irreversible and all the items will gone permanently. So unfortunate that you cannot recover it. 回答3: In the Management

Is it possible to get Identity Field value before saving it in entity framework

流过昼夜 提交于 2019-12-22 05:37:15
问题 I have a customer and sales table CUSTOMER -------------- Id (int auto increment) Name SALES --------------- Id (int auto increment) CustomerId (int) OrderTotal (decimal) With Guid i can do this. dbTransaction = dbContext.Database.BeginTransaction(isolationLevel); var customer = new Customer() { Id = Guid.NewGuid(), Name = "John Doe" }; var sales = new Sales() { Id = Guid.NewGuid(), CustomerId = customer.Id, OrderTotal = 500 }; dbContext.SaveChanges(); dbTransaction.Commit(); How can i do

SQL Azure V12 BACPAC import error. "Could not read schema model header information from package. The model version '3.5' is not supported

妖精的绣舞 提交于 2019-12-22 04:37:07
问题 We take bacpacs of our Azure V12 database every night and restore locally using the command C:\Program Files (x86)\Microsoft SQL Server\120\DAC\bin>.\SqlPackage.exe /a:Import /sf:C:\1.bacpac /tdn:db1 /tsn:server1 As of 8 Nov 2016, this command has started failing with : *** Error importing database:Could not read schema model header information from package. The model version '3.5' is not supported. This looks similar to a previous problem we had with this process back in April SQL Azure V12

How do I identify a deadlock in SQL Azure?

淺唱寂寞╮ 提交于 2019-12-22 04:08:18
问题 I have a Windows Azure role that consists of two instances. Once in a while a transaction will fail with an SqlException with the following text Transaction (Process ID N) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Now I've Googled for a while and read this post about identifying deadlocks using SQL Server logs. The problem is... How do I do it in SQL Azure? What tools do I use to access the internals of SQL Azure

how to deal with “remapping can only be done for users that were mapped to Windows or SQL logins”

非 Y 不嫁゛ 提交于 2019-12-22 01:32:14
问题 The scenario: Trying to restore from a bacpac taken from SQL Azure. Either to a new SQL Azure database instance, or an on premises server. For the earlier with the Management portal or the DAC Framework Client Side Tools. It seems to work fine, and naturally the SQL users are not mapped to SQL logins after the restore. What I tried: When I try to map it with: alter user MyUser with login = MyLogin , it fails with: Msg 33016, Level 16, State 1, Line 6 The user cannot be remapped to a login.