Comparing Users
dlgross
Posts: 17
Where can I find more information about what is happening when Users are compared?
This discussion has been closed.
Comments
Thanks for your post. The information about users comes from the syslogins system table. Is there a specific thing you want to know about the way that it compares them?
1st database
-- User
if not exists (select * from master.dbo.syslogins where loginname = N'SpmUser')
exec sp_addlogin N'SpmUser'
GO
sp_grantdbaccess N'SpmUser', N'SpmUser'
GO
2nd database
-- User
if not exists (select * from master.dbo.syslogins where loginname = N'SpmUser')
exec sp_addlogin N'SpmUser'
GO
sp_grantdbaccess N'SpmUser'
GO