0

I'm using SQL Server 2008 R2. My situation appears to be different to others link, link as I have no active connections to that database as reported by sp_who2.

The physical .MDF and .LDF files are present but I cannot take the database offline or anything. Any ideas?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
TheEdge
  • 9,291
  • 15
  • 67
  • 135

3 Answers3

0

You can mandate the priority of your transaction with regards to deadlocks...

SET DEADLOCK_PRIORITY 10

So put that at the top of your alter DB statement.

USE [master]
SET DEADLOCK_PRIORITY 10
ALTER DATABASE
...
GO
S3S
  • 24,809
  • 5
  • 26
  • 45
  • Thanks I will try that.... @charithsuminda its a production server so I am attempting to find a solution that does not restart it. – TheEdge Dec 03 '17 at 05:16
0

Can you restart the Sql server service and try to do it as soon as it started. I had a simillar issue but solve by doing this.

charithsuminda
  • 341
  • 2
  • 9
0

Restart Sql Service or Restart Sql Server Machine we had simillar issue few months ago

charithsuminda
  • 341
  • 2
  • 9