8

I am having the following sql server error, while creating tempDB files. Any ideas?

enter image description here

The connection is broken and recovery is not possible. The client driver attempted to recover the connection one or more times and all attempts failed. Increase the value of ConnectRetryCount to increase the number of recovery attempts. (Microsoft SQL Server, Error: 0)

Marcello Miorelli
  • 17,274
  • 53
  • 180
  • 320

4 Answers4

5

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.

630
  • 305
  • 2
  • 10
4

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.

AFetter
  • 141
  • 4
3

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

Marcello Miorelli
  • 17,274
  • 53
  • 180
  • 320
-1

My problem was rather stupid I opened a query to my already connected server but as the query was not connected, running a line on it gave me this error so first of all check if you are connected.