Hi When I try to put the database in single user mode using this command: alter database mydatabase set SINGLE_USER with rollback immediate I am getting this erro message : Server: Msg 5061, Level 16, State 1, Line 16 ALTER DATABASE failed because a lock could not be placed on database 'mydatabase'. Try again later. Server: Msg 5069, Level 16, State 1, Line 16 ALTER DATABASE statement failed. ---------------- also when i issue select * from sysprocesses where dbid = id_of_my_database, I get 0 rows. Aren't these conflicting restults?? Can anyone suggest me a way out?? Thanks.
I think this should be fine. Try this:: USE MASTER Go alter database mydatabase set SINGLE_USER with rollback immediate
If not you could try to restart SQL servers and attempt to keep it single-user mode immediately if you have any third party application to capture counters. Satya SKJ Microsoft SQL Server MVP Writer, Contributing Editor & Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
Dear sir, i am open .mdf file because some error to this file is only read only please call me on this no any time : 091-9974145437 Thanks Nikunj Patel
I had this problem when I was trying to take a database offline. See here for a full walkthrough solution... http://www.geakeit.co.uk/2010/12/11...e-failed-because-a-lock-could-not-error-5061/
[quote user="joshgeake"] I had this problem when I was trying to take a database offline. See here for a full walkthrough solution... http://www.geakeit.co.uk/2010/12/11...e-failed-because-a-lock-could-not-error-5061/ [/quote] Welcome to the forum!. About the threat is 21 month old.