azure-sql-database

Error SQL71501 on exporting Azure SQL Database

空扰寡人 提交于 2019-12-12 10:51:16
问题 I'm getting a strange error when exporting an Azure SQL Database. Exports had been working fine until some recent schema changes, but it's now giving me Error SQL71501. The database is V12, Compatibility Level 130 (although the master database is still Compatibility Level 120). The problem seems to be caused by a new table-valued function, which uses the built in STRING_SPLIT function. There were already stored procedures using STRING_SPLIT and they don't seem to have affected the export, but

Complete Azure Deployments Take an Hour to Fail for Locked Resources

两盒软妹~` 提交于 2019-12-12 10:48:26
问题 I use Azure Resource Manager (ARM) Templates to deploy my Azure platform-as-a-service (PaaS) resources. I perform ARM Template deployments as "Complete" so resources not defined in the template are removed. When I place an Azure Resource Lock on an Microsoft SQL Server PaaS Database Azure resource and then perform a complete deployment with the database name changed it takes more than an hour for the deployment to fail. The Resource Group deployment log events contain multiple HTTP code 409

Azure Export SQL database example

痞子三分冷 提交于 2019-12-12 10:44:29
问题 Given Microsoft is deprecating the previous method of exporting a SQL DB they have put up a suggested example here: $subscriptionId = "YOUR AZURE SUBSCRIPTION ID" Login-AzureRmAccount Set-AzureRmContext -SubscriptionId $subscriptionId # Database to export $DatabaseName = "DATABASE-NAME" $ResourceGroupName = "RESOURCE-GROUP-NAME" $ServerName = "SERVER-NAME" $serverAdmin = "ADMIN-NAME" $serverPassword = "ADMIN-PASSWORD" $securePassword = ConvertTo-SecureString -String $serverPassword

getting unknown characters from azure SQL server databases when storing Arabic language Text

天大地大妈咪最大 提交于 2019-12-12 10:20:14
问题 I have tried to get Arabic text from Azure SQL Server databases I defined many Collations for my database when creating it and they still not work. Inserting text to the database I always add 'N' character before Arabic data . Working with local SQL server its Ok no problems Any Idea ? 回答1: Using NVARCHAR for the column type you should have no issues. I successfully got an Arabic text into SQL Azure table (used google translate to translate "Hello World" into Arabic, so do not laugh or abuse

How can I isolate users' data in ASP.net MVC application?

試著忘記壹切 提交于 2019-12-12 09:52:48
问题 So I have an asp.net application (using MVC5, ASP 4.5, EF) deployed on Azure. The application allows users to register and login. However, once logged in, anyone can see everyone else's data. What is the best practice to isolate the data belonging to different users so that each user can only see the data he/she creates? Another small question is how does Facebook separates its users' data? Thanks 回答1: For every piece of data a user creates, store their user ID and only allow users to see

Azure SQL Database Operation Timeout

折月煮酒 提交于 2019-12-12 09:39:15
问题 I have a shared hosting site "production" that works perfectly. It has users and thus far I have no issues. I decided to created a test environment. I created another Azure app and copied the code from my "production" site to this test site. This happen today. It has no users. I created a DB and I agreed to pay five bucks a month. So this is not a free account. I uploaded my seed data which part of it was 40K rows of zip code. That went fine without issues. However, when I use the site, I

SetExecutionStrategy to SqlAzureExecutionStrategy with DbMigrationsConfiguration?

谁都会走 提交于 2019-12-12 09:34:13
问题 I saw a post today about implementing SqlAzureExecutionStrategy: http://romiller.com/tag/sqlazureexecutionstrategy/ However, all examples I can find of this use a Configuration that inherits from DbConfiguration. My project is using EF6 Code First Migrations, and the Configuration it created inherits from DbMigrationsConfiguration. This class doesn't contain a definition for SetExecutionStrategy, and I can find no examples that actually combine SqlAzureExecutionStrategy (or any

How to avoid data loss with EF Model First database schema upgrade?

Deadly 提交于 2019-12-12 08:38:33
问题 This is a long question, but I would be very very thankful if I can get some good advice on this. In short, I’m looking for a good approach for version upgrade of MS SQL database schema that also demands data being moved from deleted tables into new tables. I think Stack Overflow is the most appropriate place for this question (not dba.stackexchange.com) because at its core, this is an issue for .NET developers using Entity Framework, and the database parts of this consists mostly of auto

Unable to restore bacpac due to foreign key conflict

蹲街弑〆低调 提交于 2019-12-12 08:36:02
问题 I'm attempting to restore a backup (.bacpac) of a SQL Azure database to another SQL Azure database but am unable to do so because of the following error: Error encountered during the service operation. Could not import package. Error SQL72014: .Net SqlClient Data Provider: Msg 547, Level 16, State 0, Line 3 The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_x_xx". The conflict occurred in database "x", table "dbo.x". Error SQL72045: Script execution error. The executed

How to migrate existing ASP.NET MVC 3 Project with .MDF file (Sql 2008) to Windows Azure Emulator (using SQL Azure)

╄→гoц情女王★ 提交于 2019-12-12 07:38:49
问题 I have existing project in Visual Studio 2010, ASP.NET MVC 3 with existing database using .mdf (SQL 2008 Express). After doing some googling, I got confused because there are so much resources. Could you help me pointed me out the straightforward tutorial link? 回答1: First of all it is large question and you will have to work in parts to get everything done. The following steps are written with understanding that you do have Windows Azure subscription and have basic understanding of ASP.net,