首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

批改数据库用户名为默认

2012-09-14 
修改数据库用户名为默认declare tb cursor local forselect sp_changeobjectowner[+replace(user_name

修改数据库用户名为默认

declare tb cursor local forselect 'sp_changeobjectowner''['+replace(user_name(uid),']',']]')+'].['+replace(name,']',']]')+']'',''dbo'''from sysobjectswhere xtype = 'U' and status>=0 and user_name(uid) <> 'dbo'open tbdeclare @s nvarchar(4000)fetch tb into @swhile @@fetch_status=0beginexec(@s)fetch tb into @sendclose tbdeallocate tbgo

热点排行