_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › 覲旧SID蠍壱
declare @LOGINNAME varchar(100)

declare @CHANGECOMMAND varchar(100)

declare USERCURSOR cursor for 
  select name from sysusers 
  where name not in (
' public'
, 'dbo'
, 'guest'
, 'sys'
, 'Information_schema'
, 'db_owner'
, 'db_accessadmin'
, 'db_securityadmin'
, 'db_ddladmin'
, 'db_backupoperator'
, 'db_datareader'
, 'db_datawriter'
, 'db_denydatareader'
, 'db_denydatawriter')

open USERCURSOR

fetch next from USERCURSOR into @LOGINNAME
while @@fetch_status=0
begin

  select @CHANGECOMMAND = 'exec sp_change_users_login ''Auto_Fix'', ''' +@LOGINNAME + ''''
  PRINT 'Executing the command '+@CHANGECOMMAND
  exec (@CHANGECOMMAND )

  fetch next from USERCURSOR into @LOGINNAME
end

close USERCURSOR
deallocate USERCURSOR
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

蟾覿 螳 企 覦 豐螳 朱伎 豐襯 朱 貅讌 る 企至 蟾. 襷谿螳讌襦 襷 ロ 襷企 覦 襷 覦蟆 譯手 貍 覿蠍磯ゼ 襷 蠏碁讌 る 蠏瑚 襷豺 豐襯 手鍵 企 蟆螻 螳. (T. 殊)