Posted By

edwinet on 11/04/11


Tagged

security


Versions (?)

Maps an existing database user to a SQL Server login.


 / Published in: SQL
 

URL: http://msdn.microsoft.com/en-us/library/ms174378.aspx

  1. -- Showing a report of the current user to login mappings
  2. EXEC sp_change_users_login 'Report';
  3. GO
  4.  
  5. -- Automatically mapping a user to a login, creating a new login if it is required
  6. EXEC sp_change_users_login 'Auto_Fix', 'Mary', NULL, 'B3r12-3x$098f6';
  7. GO

Report this snippet  

You need to login to post a comment.