azure-sql-database

Azure Function execution speed is extremely slow and inconsistent

牧云@^-^@ 提交于 2019-12-10 03:50:55
问题 I am writing few Azure Functions script that reads and write from/to an internal database and display relevant information into a webpage. I noticed extreme slowness or even timeout in the web UI when loading the web page which calls the Azure Function script. After further investigation, I realized that the following: Azure Function scripts sometimes takes anywhere between 10 seconds to more than 1 minutes to connect to SQL database. Sometimes the scripts will run in few millisecond and

Computed columns sometimes missing from SELECT *

有些话、适合烂在心里 提交于 2019-12-10 03:26:05
问题 In SQL Azure, I have a table more or less set up like this, with two computed columns ( IsExpired and IsDeadlineExpired ) that simply compare non-nullable datetime columns to the current time: CREATE TABLE [dbo].[Stuff] ( [StuffId] int NOT NULL IDENTITY(1,1), [Guid] uniqueidentifier NOT NULL, [ExpirationDate] datetime NOT NULL, [DeadlineDate] datetime NOT NULL, [UserId] int NOT NULL, [IsExpired] AS CAST((CASE WHEN [ExpirationDate] < GETUTCDATE() THEN 1 ELSE 0 END) AS bit), [IsDeadlineExpired]

Do I use Azure Table Storage or SQL Azure for our CQRS Read System?

扶醉桌前 提交于 2019-12-10 01:58:58
问题 We are about to implement the Read portion of our CQRS system in-house with the goal being to vastly improve our read performance. Currently our reads are conducted through a web service which runs a Linq-to-SQL query against normalised data, involving some degree of deserialization from an SQL Azure database. The simplified structure of our data is: User Conversation (Grouping of Messages to the same recipients) Message Recipients (Set of Users) I want to move this into a denormalized state,

Entity Framework Many-to-Many Clustered vs. Nonclustered Index

佐手、 提交于 2019-12-09 16:01:24
问题 I designed an entity data model with two entities between which there exists a many to many relationship. When I auto-generate SQL code to generate the database for this model, it has generated a table (two columns) to keep track of this many-to-many association. However, this table has a PRIMARY KEY NONCLUSTERED on both columns. Since I want this to work on SQL Azure which doesn't like tables with only nonclustered indices, I was wondering whether there is a good way of telling the code

SQL Azure Integrated Authentication with a cloud-only Azure Active Directory fails

≯℡__Kan透↙ 提交于 2019-12-09 06:31:06
问题 I have created an Azure tenancy and configured the following: Azure AD with: A simple custom domain name (less than 15 characters). DNS verified etc. All good. Users and Admins groups Users in both groups A VNET and DNS and IP Addresses Enabled Device Management Enabled Domain Services and connected to the VNET Note that there is nothing on premise, this is all in the cloud. My physical laptop is effectively being used just as a jump box. A SQL Azure database and server with: Firewall rules

How to use SqlAzureExecutionStrategy and “Nolock”

穿精又带淫゛_ 提交于 2019-12-09 05:34:58
问题 To deal with SQL timeouts I'm trying to use SqlAzureExecutionStrategy (https://msdn.microsoft.com/en-us/data/dn456835.aspx) The problem I am running into is it prevents "user initiated transactions" which seem to be the recommended way to implement "with (nolock)" in EF (http://www.hanselman.com/blog/GettingLINQToSQLAndLINQToEntitiesToUseNOLOCK.aspx, NOLOCK with Linq to SQL). example code public AspnetUser GetAspnetUserByUserName(string userName) { using (var tx = new TransactionScope

calculate size of sql azure database

狂风中的少年 提交于 2019-12-09 04:10:17
问题 How can I calculate the current size of a SQL Azure Database? (Not the maximum size limit) Several places (like this) suggest using this sql: SELECT SUM(reserved_page_count) * 8192 FROM sys.dm_db_partition_stats However when executing this as the Administrator login I get this error: Msg 297, Level 16, State 1, Line 1 The user does not have permission to perform this action. 回答1: This is probably because you're running the query on the master database. If you're using SQL Server Management

MVC ELMAH and SQL Azure

会有一股神秘感。 提交于 2019-12-09 04:08:20
问题 back-story: We mainly use AWS for everything (hosting, database, notifications, etc.). Now, I'm looking at moving the database side to SQL Azure since we've been getting crazy bills on AWS RDS. So all I tried to do was create a DB in SQL Azure and update the connection string to point to the new DB. In the past, ELMAH (this specific implementation: https://github.com/alexanderbeletsky/elmah.mvc) worked flawlessly in the past. current situation: I just created a new DB in SQL Azure and noticed

Import bacpac fails with “does not contain QueryStoreStaleQueryThreshold”

这一生的挚爱 提交于 2019-12-09 02:36:55
问题 I am getting the error below when trying to import bacpac file from Azure sql database with management studio 2014. I have upgraded the Azure sql database to v12 and suspect it has something to do with this, but it works with some v12 databases and fails on some. Does anyone know how to resolve this? Could not load schema model from package. (Microsoft.SqlServer.Dac) ------------------------------ ADDITIONAL INFORMATION: The Element or Annotation class SqlDatabaseOptions does not contain the

How to connect On-premise database servers to sql azure database server

杀马特。学长 韩版系。学妹 提交于 2019-12-08 21:05:32
I have 4 on-premise database server that has to be connected to Sql azure server as linked server.I will be querying these on-premise server from sql Azure database server.As far as I checked online I get the answer as it is not supported in Azure. Kindly advice on the same. Silvia Doomra Azure SQL DB is previewing Elastic Database Query feature at this point in time that will help you query from Azure SQL DB to other DBs. You can get detailed information about the feature here . 来源: https://stackoverflow.com/questions/31129503/how-to-connect-on-premise-database-servers-to-sql-azure-database