azure-sql-database

Two Azure Mobile Services (.NET backend) sharing the same Database

拟墨画扇 提交于 2019-12-03 09:15:07
I have two Azure Mobile Services (.NET backend) which share the same Azure Database. Let say Service "X" and "Y". The database is created by service "X" (when it ran for the first time) and created tables "TA" with schema name "X". Then I ran service "Y" which created the same tables "TA" and "TB" in the same database but with schema name "Y". Now I want to make service "Y" to use schema "X" to make sure both services use the same data. Inside the "TADataController" I changed the code to: protected override void Initialize(HttpControllerContext controllerContext) { base.Initialize

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

空扰寡人 提交于 2019-12-03 09:08:11
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? 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, MVC, SQL and VS2010. Step 1: Install Windows Azure SDK 1.6 http://go.microsoft.com/fwlink/?LinkID=234939

Why does SqlAzureExecutionStrategy not handle error: 19 - Physical connection is not usable

这一生的挚爱 提交于 2019-12-03 09:04:54
问题 Full exception: System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable) Why isn't this handled by the SqlAzureExecutionStrategy ? Especially because this happens during VIP swaps. Is it a good idea to write

MultiTenancy with DbContext and TenantId - Interceptors, Filters, EF Code-First

六眼飞鱼酱① 提交于 2019-12-03 08:22:17
问题 My organization needs to have a shared database, shared schema multitenant database. We will be querying based on TenantId. We will have very few tenants (less than 10) and all will share the same database schema with no support for tenant-specific changes or functionality. Tenant metadata will be stored in memory, not in the DB (static members). This means all entities will now need a TenantId, and DbContext needs to know to filter on this by default. The TenantId will likely be identified

Is it possible to attach a MDF file to an Azure SQL database?

依然范特西╮ 提交于 2019-12-03 07:44:55
I have just created an Azure Website and Linked SQL Database. I have a SQL Server 2008 SP2 database on my local machine. Is it possible to detach the local .mdf file, FTP it to Azure and then attach it as a SQL database in Azure? The only other way is to export the scheme and load this, followed by the data. In the absence of detaching and attaching DBs, I have come across "SQLAzureMW" which looks very useful in guiding me through this process. Thank you in advance. You can deploy an database from Management studio to Azure. 来源: https://stackoverflow.com/questions/20814658/is-it-possible-to

ASP.NET MVC 4 - How should I encrypt the connection string to my production SQL server?

和自甴很熟 提交于 2019-12-03 07:42:18
问题 I have an ASP.NET MVC 4 project which is to be deployed to Azure for production, in production I use a SQL Azure database. My problem is that I want to connect to the SQL Azure database only in the production deployment, and not when developing, and that the SQL Azure connection string should be encrypted. Now, I can solve the first requirement through a Web.config transform, so that the database connection string gets substituted upon deployment to Azure. However, I don't see how to combine

ID Generation for Sharded Database (Azure Federated Database)

梦想的初衷 提交于 2019-12-03 07:15:45
I have been looking for some articles or guidence on best practice for id generation (for the federated/primary key) for Azure Federated databases and haven't found anything compelling. Federated tables don't support identity columns, so it seems to me that the only practical type of id is a GUID, as trying to centrally create and use a BigInt creates a single point of failure in the app. My chief concern is the performance implications of using GUIDs over BigInts (particularly for indexing the tables). Is there any recommended/best practice (or existing libraries) to create unique BigInts for

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

浪子不回头ぞ 提交于 2019-12-03 07:08:06
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_transactions . The problem is present for every table in the database but other databases on the same

Restoring SQL Server backup to Azure SQL Database

狂风中的少年 提交于 2019-12-03 06:28:23
问题 Is there a way to simply take a SQL backup .bak file, and using that as a restore point to generate a new database on Azure SQL Database? The wizard that I see generally recommended in this situation wants to create a custom file to use, but it pukes on the encrypted objects ( functions and views ) and I don't see another way to get it going. 回答1: If you already have a database on local machine then you can migrate it directly on Azure using SQL Management Studio. Follow these steps: Right

SSMS Object Explorer - Select Top N Rows missing when connected to Azure DB

隐身守侯 提交于 2019-12-03 06:12:43
I just upgraded my SSMS to 2008 R2. I'm missing the option to select the top 1000 rows from a table, like this: Mine looks like this: I know how to change the number of rows that are displayed, but the options aren't there at all. I saw that someone submitted a bug for this a few years ago, but there was no workaround, and I'm not sure what to do. Any ideas? EDIT - Azure Problem? I just used SSMS to open my local SQL Server, and I get the option to select the top 100 rows. But in my other SSMS instance, the one that is connected to my Azure DB, I don't see it. Is it possibly an Azure