azure-sql-database

Login to SQL Azure using Windows Authentication

隐身守侯 提交于 2019-12-04 02:38:53
问题 Is it possible to have domain joined SQL Azure servers or Database so that we can use logins from our Active directory using windows Authentication? 回答1: Unfortunatly SQL Azure currently does not support Windows Authentication right now (i.e: integrated security) and it only supports SQL Authentication where user should provide username and password all the time. For more info on SQL Azure security guide lines take a look at the link below: https://azure.microsoft.com/en-us/documentation

SQL AAD Token Based Authentication - Login failed for user 'NT AUTHORITY\\ANONYMOUS LOGON

孤人 提交于 2019-12-04 01:44:51
Requirement - I am trying to connect to azure SQL DB from a asp.net MVC application and the connection type to azure SQL DB is "token based" and below are the set up done from my end. a. Created an AAD application( ex : MTSLocal ) with certificate based authentication. b. Added permission to the above AAD in SQL. CREATE USER [MTSLocal] FROM external provider; c.In code level I am trying to get a access token by using Client ID( obtained from step a.) and certificate and the resource I am connecting to is " https://database.windows.net ". Please refer the sample code - string authority = string

SQL Azure - One session locking entire DB for Update and Insert

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 17:19:51
问题 SQL Azure issue. I've got an issue that manifests as the following exception on our (asp.net) site: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated. It also results in update and insert statements never completing in SMSS. There aren't any X or IX locks present when querying: sys.dm_tran_locks and there are no transactions when querying sys.dm_tran_active_transactions or sys.dm_tran_database

users assigned a sql azure role

拜拜、爱过 提交于 2019-12-03 17:09:36
问题 I am trying to make sure that all users have been assigned a particular role. Is there any view or SQL query for getting this information? 回答1: The views have changed names but the following should work against SQL Azure select m.name as Member, r.name as Role from sys.database_role_members inner join sys.database_principals m on sys.database_role_members.member_principal_id = m.principal_id inner join sys.database_principals r on sys.database_role_members.role_principal_id = r.principal_id

Error While Enabling Code-First Migrations On Mobile Services Database

牧云@^-^@ 提交于 2019-12-03 16:27:14
问题 I have an Azure Mobile Services project (C# backend) that I recently created and attached to an Azure SQL database. I have been trying to enable Code-First Migrations on that backing database, but it throws errors when I try to update the database. I ran through all of the conventional steps to enable migrations (Enable-Migrations, Add-Migration). But when I try to Update-Database, it returns the following error: Cannot create more than one clustered index on table 'dbo.Appointments'. Drop

“select count(id) from table” takes up to 30 minutes to calculate in SQL Azure

风格不统一 提交于 2019-12-03 16:24:57
问题 I have a database in SQL Azure which is not taking between 15 and 30 minutes to do a simple: select count(id) from mytable The database is about 3.3GB and the count is returning approx 2,000,000 but I have tried it locally and it takes less than 5 seconds! I have also run a: ALTER INDEX ALL ON mytable REBUILD On all the tables in the database. Would appreciate if anybody could point me to some things to try to diagnose/fix this. (Please skip to UPDATE 3 below as I now think this is the issue

Multi-tenancy: Individual database per tenant

孤街浪徒 提交于 2019-12-03 15:18:15
We are developing a multi-tenant application. With respect to architecture, we have designed shared middle tier for business logic and one database per tenant for data persistence. Saying that, business tier will establish set of connections (connection pool) with the database server per tenant. That means application maintain separate connection-pool for each tenant. If we expect around 5000 tenants, then this solution needs high resource utilization (connections between app server and database server per tenant), that leads to performance issue. We have resolved that by keeping common

Code First Migrations in SQL Azure - Tables without a clustered index are not supported

蓝咒 提交于 2019-12-03 15:13:29
I can't seem to get my Code-First Migration to create my SQL Azure database. It keeps complaining about SQL Azure's lack of support for tables without clustered indexes and I cant find a way around to create my database. Note: I'm using CreateDatabaseIfNotExists to create the change tracking tables on the first time database creation because apparently DropCreateDatabaseIfModelChanges doesn't do that for you public partial class IUnityDbContext : DbContext { public IUnityDbContext() : base("Name=IUnityDbContext") { Database.SetInitializer(new CreateDatabaseIfNotExists<IUnityDbContext>()); /

Full Text Search on SQL Azure [duplicate]

混江龙づ霸主 提交于 2019-12-03 15:12:06
问题 This question already has answers here : SQL Azure and Full-Text Catalogs, Indexes and Searching (4 answers) Closed 4 years ago . I have a database that I am migrating to SQL Azure. There are a couple of stored procedures in this database that rely on ContainsTable. From my understanding, SQL Azure does not support this. Because of this, I was hoping there would be a way to imitate this functionality in C# code. Does anyone know how to either: a) Utilize ContainsTable in SQL Azure or b)

Getting started with Azure storage: Blobs vs Tables vs SQL Azure

ⅰ亾dé卋堺 提交于 2019-12-03 14:38:20
问题 It's quite a topic, blobs vs tables vs SQL , and despite all I read so far I still can't find some proper reasoning on what to use when. We have a multi-tenant SaaS web-application which we are about to move to Azure. We use an SQL Server 2008 database. We store documents and log information that belongs to the documents. Kinda like dropbox does. The forums state that you better use Azure Tables when you are considering "large" objects. We typically store hundreds of documents per user where