Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
fqiao70
Yak Posting Veteran
52 Posts |
Posted - 2003-04-29 : 10:17:10
|
| SELECT 'exec sp_addlogin @loginame = ''' + su.name + ''', @sid = ' + su.sid + ' go 'FROM sysusers suLEFT OUTER JOIN master..syslogins sl ON su.sid = sl.sidWHERE su.islogin = 1 --su.issqluser = 1 --AND sl.sid IS NULLAND su.name NOT IN ('guest', 'INFORMATION_SCHEMA')And su.name NOT IN ('dbo', 'INFORMATION_SCHEMA')how to make su.sid to add to the string, I couldn't make it right.Thanks for your help |
|
|
|
|
|