Viewing 3 posts - 1 through 3 (of 3 total)
How about this? Less lines
select 'ALTER DATABASE [' + name + '] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;' + char(10)
+ 'EXEC master.dbo.sp_detach_db @dbname =...
June 26, 2014 at 8:20 am
#1725105
boumerlin,
I have the same issue as you stated in this thread. The difference is that I want to drop all of these "orphaned" users that exist in AD, but still...
March 22, 2011 at 12:16 pm
#1302074
Thanks much. This will be required reading for my Jr. DBAs.
February 22, 2011 at 8:19 am
#1289881