azure-sql-database

Seamless EF Migrations from Staging > Production with Schema Change

拥有回忆 提交于 2020-01-02 05:58:09
问题 I have a simple web app. It consists of an Azure Web App with Staging and Production slots. When there are no DB migrations to consider, I can easily achieve a seamless update by: Deploy App to Staging Swap Staging <> Production Slots This gets trickier when I have a DB migration to handle. Right now what I do is: Deploy App to Staging When deployment is ready, run update-database to Prod (no staging database) Swap Staging <> Production Slots This means that I still effectively have downtime

Is Azure really conveniant for a medium production website regarding SQL Azure performance, when speed is a critical matter?

不想你离开。 提交于 2020-01-02 05:33:11
问题 So i did read a lot about Azure yesterday as i'm considering my plans for the future of my Webapps. The question is whether to migrate or not in 2012 from a dedicated hosting with two networked strong servers (one front for IIS, one for SQL Server 2008). We're talking about ASP.net webapps only, say 10 websites network querying the same database. The pros : i do want to let go the hardware / OS maintenance / crash worries. Azure looks cool on that point. The cons : i read so/so opinions about

Alternative to TransactionScope for Entity Framework when using Sql Azure across multiple connections

ぃ、小莉子 提交于 2020-01-02 05:22:54
问题 I am using EF to access Sql azure. In one situation I need to make changes to two databases, for which normally I would use TransactionScope and it would escalate to MSDTC. Now MSDTC is not supported in Sql Azure, so I can't use TransactionScope. Is there another way to do this? (other than doing it without the distributed transaction and having to manually rollback state somehow). 回答1: One way to write your code without using the TransactionScope class is to use SqlTransaction . The

Connect to Azure SQL server via AAD Authentication using EF Core

我怕爱的太早我们不能终老 提交于 2020-01-02 05:13:51
问题 Azure SQL servers support AAD authentication, and I want my applications to connect to SQL server using AAD authentication and not SQL server admin credentials. I am using EF core to connect to SQL, how do I enable EF Core to use AAD authentication. My application is deployed in Azure App Service and it has MSI extension enabled, so I am looking forward to using Microsoft.Azure.Services.AppAuthentication for getting the token from AAD. 回答1: Connect to Azure SQL server via AAD Authentication

Could not generate script from SQL Azure

喜欢而已 提交于 2020-01-02 05:02:48
问题 I would like to generate script of SQL Azure database after connecting to sql server R2 but it gives me error when i will do that. > TITLE: Microsoft SQL Server Management Studio Script failed for Server 'myserver'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1540+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Script+Server&LinkId=20476 ---------

Azure website sometimes can't connect to SQL Azure database

孤街醉人 提交于 2020-01-02 04:42:08
问题 I've been testing a website in Azure for about a month (Free trial), and now I've subscribed to pay-as-you-go. When I was on the free trial, I had absolutely no connectivity issues. Now I've deployed again to a fresh website created on the pay-as-you-go subscription with the same settings (scaling mode etc.) as the previous one. However, now when I navigate to my site, it sometimes fails to connect to my database: Server Error in '/' Application. A connection attempt failed because the

Entity Framework 4.1 code-first KeyAttribute as non-identity column

梦想与她 提交于 2020-01-02 01:03:53
问题 I've got a problem with a code-first model I've got. Data is now in the database so I can't re-seed the database using a DropCreateDatabaseIfModelChanges class, but I need to change one table so that a bigint column is not an IDENTITY(1,1). I've managed to do this using SSMS but now my EF code is saying it's out of date. This is the code for the table in question: public class Vote { [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)] public long FacebookUserId { get; set; }

Configure Azure SQL Database Firewall for just my Web App

99封情书 提交于 2020-01-01 18:57:33
问题 We use Azure Web Apps with Azure SQL and would like to make this setup more secure by configuring the database firewall to only allow connection from the specific web apps rather than any service in Azure . How can I limit connections to just my Azure services? 回答1: Assuming that you have an ip address (hosting plan needs to be shared, basic or standard)**: a) Navigate to SQL Databases >> Servers Tab >> Select the server hosting your database >> Configure Tab b) Alternatively select your

How to connect to Azure SQL database from Django app on Linux VM

霸气de小男生 提交于 2020-01-01 15:05:13
问题 I searched tutorials or full explanations about using SQL Azure Database with Django application, that hosted on Linux VM. I changed database section of settings.py like this DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'azure_database_name', 'USER': 'user@server_name_like_wjrnvlwjrng3', 'PASSWORD': 'my_pass', 'HOST': 'server_name_like_wjrnvlwjrng3.database.windows.net', 'PORT': '1433', 'OPTIONS': { 'driver': 'FreeTDS', 'TDS_Version': '7.1', } } } I append [MyDb] host =

Migrate an existing DotNetNuke portal to windows azure

风流意气都作罢 提交于 2020-01-01 12:11:11
问题 I am currently moving from my shared host to azure and I have been migrating my asp.net applications to azure/sql azure. For the mvc3/4 sites, I had to change their membership providers to the Universal Membership provider in order to get them to sit on SQL Azure. Now I have to do the dnn sites and I can't quite fathom what strategy to use. I have tried generating the database script with the For SQL Azure option but I get a tonne of errors like Deprecated feature 'String literals as column