MCSE技术论坛

首页 » 微软基础架构 » Microsoft SQL Server 2005/2008 » 修改过程
洛洛 - 2007-4-13 17:21:00


declare tb cursor local for
select 'sp_changeobjectowner ''['+replace(user_name(uid),']',']]')+'].['
+replace(name,']',']]')+']'',''dbo'''
from sysobjects
where xtype in('U','V','P','TR','FN','IF','TF') and status>=0
open tb
declare @s nvarchar(4000)
fetch tb into @s
while @@fetch_status=0
begin
exec(@s)
fetch tb into @s
end
close tb
deallocate tb
go


zjqiqi84727 - 2008-1-3 9:31:00
什么意思啊:default1:
7testing - 2008-3-7 10:51:00
??????
1
查看完整版本: 修改过程