Hi, I'm trying to drop the connections of a database using this command :
"alter database dbName set single_user with rollback immediate "
But u got this error "ALTER DATABASE failed because a lock could not be placed on database 'dbName'. Try again later."
Please I need help as soon as possible.
Regards
Tamer Khalil
Loading

naura paxPosted Oct 23, 2009, 10:16 AM
ALTER
DATABASE mydb SET OFFLINE WITH ROLLBACK IMMEDIATE
and then run this to run database again.
ALTER DATABASE mydb SET ONLINE WITH ROLLBACK IMMEDIATE
Tamer KhalilPosted Oct 23, 2009, 9:51 AM
naura paxPosted Oct 23, 2009, 9:38 AM
is AUTO_UPDATE_STATISTICS_ASYNC option set to on then set it to off and also check if their are any active jobs in the server from
select * from sys.dm_exec_background_job_queue
if there are any jobs then kill them using KILL STATS JOB