Entradas

Mostrando entradas de febrero, 2013

SQL Server - How to fix orphan users

Imagen
  Hi, now we will focus in how to fix orphan users, well, why happen this? here an example     When we do database recovery on a new server, the link between ID and the user account not do math, because the original ID is ovewrite in the new box, for this reaso is necessary that they do match again, to do that, we will use the store procedure named   sp_change_users_login     This store procedure have special parameters, these are:     Report        -> Show all orphan users on database      Auto_Fix     -> Fix ID broken      Note : Remember you have got to be inside of database recovered, if not you will not see the orphan users  --Example:    USE  dbTest GO -- Show orphan users on dbTest   EXEC   sp_change_users_login   'Report'             ...