use [master]
select count(*) from master..sysprocesses where dbid=db_id('UFDATA_777_2007')
set noexec off set parseonly off
go
sp_detach_db N'UFDATA_777_2007', N'false'
exec sp_helpreplicationdboption
exec sp_MSdbuseraccess N'db', N'%'