azure-sql-database

Pass Azure AD Token for Azure SQL DB in pre-connection arguments to SQLAlchemy create_engine()

℡╲_俬逩灬. 提交于 2020-08-26 06:49:38
问题 I'm wanting to connect to an Azure SQL DB via SQLAlchemy with an AD token. I've followed https://github.com/felipefandrade/azuresqlspn and can successfully connect with this method. However, I want to extend this and use SQLAlchemy to manage the connection. from os import environ import struct import adal from sqlalchemy import create_engine import pyodbc clientSecret = environ.get('clientSecret') clientID = environ.get('clientID') tenantID = environ.get('tenantID') authorityHostUrl = "https:

Django and Azure SQL key error 'deferrable' when start migrate command

柔情痞子 提交于 2020-08-20 02:41:08
问题 I try connect django to Azure SQL and have error KeyError: deferrable when i start migrate command. i can't find resolution for this issue. i use this application: asgiref==3.2.10 Django==3.1 django-mssql-backend==2.8.1 pyodbc==4.0.30 pytz==2020.1 sqlparse==0.3.1 and this is my config in settings.py: DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'DBNAME', 'USER': 'DBUSER', 'PASSWORD': 'PASSWORD', 'HOST': 'databasename.database.windows.net', 'PORT': '1433', 'OPTIONS': {

Django and Azure SQL key error 'deferrable' when start migrate command

橙三吉。 提交于 2020-08-20 02:39:36
问题 I try connect django to Azure SQL and have error KeyError: deferrable when i start migrate command. i can't find resolution for this issue. i use this application: asgiref==3.2.10 Django==3.1 django-mssql-backend==2.8.1 pyodbc==4.0.30 pytz==2020.1 sqlparse==0.3.1 and this is my config in settings.py: DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'DBNAME', 'USER': 'DBUSER', 'PASSWORD': 'PASSWORD', 'HOST': 'databasename.database.windows.net', 'PORT': '1433', 'OPTIONS': {

Azure publish: Login failed for user 'xxxxxx'

☆樱花仙子☆ 提交于 2020-08-12 01:33:14
问题 I am using .NET backend for my Mobile App of Azure. I have been using Code-First migrations for my database and done many migrations and publishes so far. Everything was nice and smooth. Then I decided to reset my SQL Server password from Azure portal. After that things started to go south. The problems that I faced after password change: 1- When I tried Add-Migration blabla in Package Manager Console, Visual Studio told me that all my previous migrations must be applied first. 2- I tried

Azure publish: Login failed for user 'xxxxxx'

拟墨画扇 提交于 2020-08-12 01:29:46
问题 I am using .NET backend for my Mobile App of Azure. I have been using Code-First migrations for my database and done many migrations and publishes so far. Everything was nice and smooth. Then I decided to reset my SQL Server password from Azure portal. After that things started to go south. The problems that I faced after password change: 1- When I tried Add-Migration blabla in Package Manager Console, Visual Studio told me that all my previous migrations must be applied first. 2- I tried

Azure publish: Login failed for user 'xxxxxx'

旧巷老猫 提交于 2020-08-12 01:28:31
问题 I am using .NET backend for my Mobile App of Azure. I have been using Code-First migrations for my database and done many migrations and publishes so far. Everything was nice and smooth. Then I decided to reset my SQL Server password from Azure portal. After that things started to go south. The problems that I faced after password change: 1- When I tried Add-Migration blabla in Package Manager Console, Visual Studio told me that all my previous migrations must be applied first. 2- I tried

Connect to Azure SQL in Python with MFA Active Directory Interactive Authentication without using Microsoft.IdentityModel.Clients.ActiveDirectory dll

不羁岁月 提交于 2020-08-05 06:18:15
问题 To connect to Azure SQL Database using MFA (which is in SSMS as "Active Directory - Universal") Microsoft recommends and currently only has a tutorial on connecting with C# using Microsoft.IdentityModel.Clients.ActiveDirectory Setting Authentication='Active Directory Interactive'; in a regular ODBC connection string from Python or Powershell results in the error Cannot find an authentication provider for 'ActiveDirectoryInteractive' This seems to be because per Microsoft's example code at