Programming 笔记

工作中遇到的问题就记载这里

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

exec sp_changedbowner 'Aambriore\mra'

EXEC sp_change_users_login 'Auto_Fix', 'lts', null

Exec sp_change_users_login 'Auto_Fix','dbo'

EXEC sp_change_users_login 'Update_One', 'dbo', 'Aambriore\mra'

select SID, [name] from master..sysxlogins

select [name], sid from sysusers

exec sp_fixusers

exec sp_changedbowner 'sa'

exec sp_change_users_login 'report'

SELECT UserName = name FROM sysusers
WHERE issqluser = 1 and (sid is not null and sid <> 0x0)
and suser_sname(sid) is null
and name in(select name from master.dbo.syslogins)
ORDER BY name

posted on 2006-02-17 11:53  IT 笔记  阅读(348)  评论(0编辑  收藏  举报