Milkybar-kid
asked on
Re-add a user to SQL2005 database
If a user is removed from a database in error can it be re-added just by using the same name?
i.e User fred has dbo_owner rights and owns table fred.table1
fred is deleted as a user then re-added as dbo_owner
Will "new" fred have the same permissions as "old" fred?
i.e User fred has dbo_owner rights and owns table fred.table1
fred is deleted as a user then re-added as dbo_owner
Will "new" fred have the same permissions as "old" fred?
if you are adding the user with the db_owner privileges then the user by default has the privilages to access all the database objects, define DDL and DML operations... db_owner is a strong role from the point of privilages.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ick. I see that the quotes got munged above. The sp_change_users_login should be:
exec sp_change_users_login 'update_one', 'sqlusername', 'sqlloginname'
where sqlusername is the db user, and sqlloginname is the instance login.
exec sp_change_users_login 'update_one', 'sqlusername', 'sqlloginname'
where sqlusername is the db user, and sqlloginname is the instance login.