I was playing with extending Fluent Migrator and wanted to check what was left in my DB after the last try.
Trying to open the tables sub folder gave me this error:
So I tried taking the DB offline and got stuck with:
Closing that window and trying to open the DB again got me:
So I have decided to go brutal, I opened Computer Management->Services and Applications->Services and stopped the SQL Server (MSSQLSERVER) service:
And then started it again (I like to give it a few second to relax then doing the restart).
Now reconnecting to the DB works.
But what about the bug that caused all of this?
I tried the test again, but this time tried to open the Tables folder at the same time:
The test is stuck on:
What I found out?
The test is stuck when trying to open a workspace to the SDE. But (this time) I don't blame ESRI because it seems the current connection to SQL doesn't allow any other connection – I can't even open SQL Server Management.
What I found in the code?
Fluent Migrator opens a connection and then begins a transaction – and closes it only when all the "StepUp"s are complete. While I want to open a SDE connection in the middle of that transaction – and get stuck doing it.