首先把iemis的权限转让给DBO ALTER AUTHORIZATION ON SCHEMA::iemis TO dbo;然后更改数据库所有者(执行一下SQL):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就可以删除原来的iemis 架构
并且生成相应的数据库权限脚本,
在你的新的数据库上执行一下.
ALTER AUTHORIZATION ON SCHEMA::iemis TO dbo;然后更改数据库所有者(执行一下SQL):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就可以删除原来的iemis 架构