- Local time
- Tomorrow, 04:30
- Joined
- Jan 20, 2009
- Messages
- 12,895
I was having problems obtaining a lock on a table in a multiuser database.
I connected as dbo via Management Studio on the host server machine and changed the Restrict Access Option to SINGLE_USER. The warning was displayed that all other connections would be dropped and the database then showed Single User.
I was still unable to obtain the lock so I went to set it back to MULTI_USER and was told I didn't have access. Somehow another connection overrode mine, the dbo on the server who put it into single user mode and became the single user.
How is this possible?
So I rebooted the server and went back into properties. Then decided I would have another go at getting the lock which failed again. Returning to the Properties I was told I no longer had access again.
This really shouldn't happen. Rebooted again and very quickly put it back to MULTI_USER before the mystery competitor got back in.
The only other connection that should have possibly been active at the time was a web server that intermittently queries this database. Would it be able to connect if it was the same user as the dbo? I have not checked this yet. Would seem like a bad setup if it were.
I connected as dbo via Management Studio on the host server machine and changed the Restrict Access Option to SINGLE_USER. The warning was displayed that all other connections would be dropped and the database then showed Single User.
I was still unable to obtain the lock so I went to set it back to MULTI_USER and was told I didn't have access. Somehow another connection overrode mine, the dbo on the server who put it into single user mode and became the single user.
How is this possible?
So I rebooted the server and went back into properties. Then decided I would have another go at getting the lock which failed again. Returning to the Properties I was told I no longer had access again.
This really shouldn't happen. Rebooted again and very quickly put it back to MULTI_USER before the mystery competitor got back in.
The only other connection that should have possibly been active at the time was a web server that intermittently queries this database. Would it be able to connect if it was the same user as the dbo? I have not checked this yet. Would seem like a bad setup if it were.