azure-sql-database

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

不问归期 提交于 2019-12-04 12:33:44
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 = server_name_like_wjrnvlwjrng3.database.windows.net port = 1433 tds version = 7.1 to /etc/freetds/freetds

How to add retry logic to ASP.NET Membership Provider for Azure SQL?

萝らか妹 提交于 2019-12-04 11:24:57
We have a database of ASP.net sqlMembershipProvider based users on an Azure SQL database. It has become apparent that the out of the box sqlMembershipProvider 4.0 does not have the required retry logic for Azure SQL connections which can drop out due to throttling or can expire. It is possible to implement our own membership provider that has this functionality but it would have to be exactly the same database interactions as the standard sqlMembershipProvider 4.0 in order to work with the existing users in our database. However for that it would require looking into the source of the original

Timeout expired. The timeout period elapsed prior to completion of the operation on Azure sql

China☆狼群 提交于 2019-12-04 10:17:36
I need to create one sql database on windows azure on the global.asax application start event, however I got this error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=296; handshake=324; [Login] initialization=0; authentication=1; [Post-Login] complete=94; My code is as follows: private void SetupSSM() { SqlConnectionStringBuilder connStrBldr = new

How do I test locally against SQL Azure?

江枫思渺然 提交于 2019-12-04 10:09:11
问题 Looks like Azure Storage Emulator omits SQL Azure. Does it hold true? Then how do I test my application that uses SQL Azure without deploying it onto live cloud? 回答1: For local testing, you can use a local SQL Server (full, express or even CE) within your app - just use local connectionstring's in place of the SQL Azure ones in your .cscfg or .config files - then the local compute instance will connect just like any other local process would. For the most part local SQL and SQL Azure are

How can I change primary key on SQL Azure

空扰寡人 提交于 2019-12-04 10:03:13
问题 I am going to change the primary key on SQL Azure. But it throws an error when using Microsoft SQL Server Management Studio to generate the scripts. Because every tables on SQL Azure must contains a primary key. And I can't drop it before create. What can I do if I must change it? Script generated IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mytable]') AND name = N'PK_mytable') ALTER TABLE [dbo].[mytable] DROP CONSTRAINT [PK_mytable] GO ALTER TABLE [dbo].[mytable]

Azure: How to move databases into Elastic Pool

瘦欲@ 提交于 2019-12-04 10:01:33
问题 We have a few databases in Pricing Tier: Basic , S0 ... like below picture: These databases were created before a new Elastic Pool is created. Now we want to move these databases into Elastic Pool for costing saving. But it seems I don't know how to move them on the Azure portal. 回答1: You can create an elastic pool in the same server as your databases, through portal using instructions here - https://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-pool-create-portal/

Intermittent Connection Timeout in Azure SQL on AJAX Request

自作多情 提交于 2019-12-04 09:21:32
问题 I've been hunting for this error that occurs intermittently on an AJAX call to an Azure ASP.NET Website, and today I've finally caught it in our logs. I was suspecting a lock was blocking the operation, but it looks like it failed trying to connect to the Azure SQL database. Here is the exception message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination

Migrate an existing DotNetNuke portal to windows azure

荒凉一梦 提交于 2019-12-04 09:03:15
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 aliases' is not supported in this version of SQL Server. Also, I don't have the option of installing a

Comparing the new SQL Azure tiers to old ones [closed]

旧街凉风 提交于 2019-12-04 08:59:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Now that Microsoft made the new SQL Azure service tiers available (Basic, Standard, Premium) we are trying to figure out how they map to the existing ones (Web and Business). Essentially, there are six performance levels in the new tier breakdown: Basic, S1, S2, P1, P2 and P3 (details here: http://msdn.microsoft

Azure SQL Creating Database Scoped Credential

我怕爱的太早我们不能终老 提交于 2019-12-04 08:25:51
I'm trying to create a scoped credential in azure SQL using SSMS. CREATE DATABASE SCOPED CREDENTIAL [cred-name] WITH IDENTITY = [db-user], SECRET = 'password' I keep running into the error message stating "Incorrect syntax near 'cred-name'. Expected '='." I'm not sure how my syntax is incorrect as I've done this exact command successfully in the past so I'm not sure what has changed. I thought maybe it was just intellisense that was messing up so I updated my SSMS instance from 17.3 to 17.7 but I still get the same error message. Does anyone have any idea of what could have changed? Running