azure-sql-database

Can we recover a deleted server for Azure SQL Database?

坚强是说给别人听的谎言 提交于 2019-12-05 06:02:51
We accidentally deleted our production server for Azure SQL database (the server, not just a database). How do we recover the server? Yes, but you need to open a support ticket - upper right-hand corner in the Azure Portal. I've no idea how you deleted the production server, but when you try to delete in the azure portal, it will remind you that deleting server is irreversible and all the items will gone permanently. So unfortunate that you cannot recover it. In the Management Portal ( http://manage.windowsazure.com ) select the SQL Databases task on the left, and Deleted Databases on the top.

SSDT failing to publish: “Unable to connect to master or target server”

随声附和 提交于 2019-12-05 05:19:06
I'm attempting to use SSDT to publish to a SQL Server database in Azure. When I do so, I am seeing the following error: Unable to connect to master or target server 'DATABASE_NAME'. You must have a user with the same password in master or target server 'DATABASE_NAME'. Ignoring the fact that it's listing a database name as the server name in the error, I'm not sure how to resolve it. When I specify the target database, I can successfully Test Connection. I can also connect using the same creds to the database through SSMS. After researching the error, it seems like it is often that the

Enable-Migrations “Object reference not set to an instance of an object”

百般思念 提交于 2019-12-05 05:13:38
I just created a new service fabric service that will periodically attempt to save some models to SQL Azure using Entity Framework and the Elastic Client Database library. I'm trying to model it as closely as I can to the SQL Azure Elastic Scale Client Library EF sample ( Elastic DB Tools EF Sample ). I'm at the point where I need to enable migrations, but when I run Enable-Migrations I'm getting the following error message. I'm using the ContextTypeName parameter since it sounded like it would be required if I'm going to eventually have different service fabric services targeting the same

SSAS Tabular on Azure?

送分小仙女□ 提交于 2019-12-05 04:56:52
I'm attempting to deploy an ssas tabular model (I don't know what I'm doing ) I have made multidimensional on SQL Server 2008 R2 with VS2013. I wanted to try Tabular in conjunction with power BI. So I set up a SQL Azure DB, I have Azure SQL database and Visual Studio 2013 Pro I can get the connection to the Azure DB in VS2013 and write T-SQL against it but when I try and create a tabular model and select the Azure database as the SQL Server workspace it fails to make a connection. Is it something to do with the compatibility module or do I need to create a Azure VM? Thank you for your help ...

EF6 Connection String in Azure

偶尔善良 提交于 2019-12-05 04:25:43
We have a website and a sql server on Azure. We have included the Entity Framework connection string in the Azure Portal but we get the following error: The connection string 'MyEntities' in the application's configuration file does not contain the required providerName attribute." Looking at the connection string it clearly has the provider: metadata=res:// /MyEntities.csdl|res:// /MyEntities.ssdl|res://*/MyEntities.msl;provider=System.Data.SqlClient;provider connection string="data source=tcp:myserver.database.windows.net,1433;initial catalog=mydatabase;user id=user@myserver;password=PASSWRD

SQL Azure Reset autoincrement

懵懂的女人 提交于 2019-12-05 03:28:47
I found a lot of topics telling to use : DBCC CHECKIDENT ('table', RESEED, 0) But this is not supported by Azure SQL. Does somebody have any idea on how to do it easily ? Thanks a lot ! DBCC CHECKIDENT is not supported for now in SQL Azure as you commented. Check this MSDN forum post , there are some solutions proposals, maybe one of them can help you out. You don't have too many options... the only one I can think of is to drop and recreate your table. 来源: https://stackoverflow.com/questions/11644507/sql-azure-reset-autoincrement

SQL Azure V12 BACPAC import error. \"Could not read schema model header information from package. The model version '3.5' is not supported

不羁岁月 提交于 2019-12-05 02:59:05
We take bacpacs of our Azure V12 database every night and restore locally using the command C:\Program Files (x86)\Microsoft SQL Server\120\DAC\bin>.\SqlPackage.exe /a:Import /sf:C:\1.bacpac /tdn:db1 /tsn:server1 As of 8 Nov 2016, this command has started failing with : *** Error importing database:Could not read schema model header information from package. The model version '3.5' is not supported. This looks similar to a previous problem we had with this process back in April SQL Azure V12 BACPAC import error: “The internal target platform type SqlAzureV12DatabaseSchemaProvider does not

Computed columns sometimes missing from SELECT *

被刻印的时光 ゝ 提交于 2019-12-05 02:43:14
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] AS CAST((CASE WHEN [DeadlineDate] < GETUTCDATE() THEN 1 ELSE 0 END) AS bit), CONSTRAINT [PK_StuffId]

How do I identify a deadlock in SQL Azure?

烂漫一生 提交于 2019-12-05 02:18:41
I have a Windows Azure role that consists of two instances. Once in a while a transaction will fail with an SqlException with the following text Transaction (Process ID N) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Now I've Googled for a while and read this post about identifying deadlocks using SQL Server logs. The problem is... How do I do it in SQL Azure? What tools do I use to access the internals of SQL Azure and getting enough data? Monitoring of SQL Azure is more limited than SQL Server, but the tools are

connect to Azure SQL database via pyodbc

帅比萌擦擦* 提交于 2019-12-05 01:51:18
问题 I use pyodbc to connect to my local SQL database which works withoout problems. SQLSERVERLOCAL='Driver={SQL Server Native Client 11.0};Server=(localdb)\\v11.0;integrated security = true;DATABASE=eodba;' cnxn = pyodbc.connect(SQLSERVERLOCAL) #works I try the connection to the azure sql database with: SQLSERVERAZURE='Driver={SQL Server Native Client 10.0};Server=tcp:mydatbase.database.windows.net,1433;Database=mydb;Uid=myuser@myerver;Pwd=mypass;Encrypt=yes;Connection Timeout=30;' cnxn = pyodbc