The connection is broken and recovery is not possible - sql server error

I had this issue when I was trying to Deploying a Database to Azure SQL Server. I tried a few times and I got the same error. I double-check the Azure permissions, Firewall, user and pwd.

What I did to fix it was run SQL Management Studio as Administrator. Simple as it.

I believe the problem was some permission to the temporary file to "C:\Users\xxx\AppData\Local\Temp" to create bacpac file.


This has been sorted out.

what it was is that while changing the tempDB file locations I put them in the T: drive and the sql server accounts did not have permissions there.

After I have copied all permissions from the sql server data folder to the T: drive it all worked fine.

to copy all the folder permissions from D:\data to T:\tempdb using Powershell (run as administrator):

$Acl = Get-Acl "D:\data"
Set-Acl "T:\tempdb" $Acl

enter image description here


This is an old thread but this was the first hit on Google so I'm going to add my experience here. I was using SQL Server 2014 Enterprise while remote connected to the server.

I was attempting to restore a database from backup WITH REPLACE and RESTORE WITH NORECOVERY. Between the backup and my first transaction log I received the error indicated above. No databases on the server were able to be accessed; all received the same message. I was, however, able to access the other databases by connecting through a local instance of SSMS and it indicated that my intended target database was (Restoring...), as expected.

Turns out, all I had to do on the server instance of SSMS was restart SSMS. All was normal after that.