RE: SQL 7 - Set Single_User
I usually try something like this "kill & set" in an attempt to get the single_user option in before the other user/app does: use master declare @kill varchar (8000) select @kill = ISNULL(@kill , '') + ' kill ' + cast(spid as varchar) from sysprocesses where dbid = db_id('pubs') print @kill exec (@kill) exec sp_dboption […]
2003-08-13