October 13, 2003 at 10:00 am
Hi,
I have to assign db_owner role to 6 users in 5 different databases. Is there any stored procedure can be use for this instead of using EM?
Thanks.
October 13, 2003 at 2:29 pm
Run this command in each DB, replacing 'security_account_name' with the actual user account name.
EXEC sp_addrolemember 'db_owner','security_account_name'
-Dan
Edited by - dj_meier on 10/13/2003 2:34:44 PM
-Dan
October 14, 2003 at 5:06 am
Depending on what you want to accomplish you might want to use sp_addalias instead. The difference being that with an alias, the 'are' the dbo. The difference (minor) is that the real dbo creates objects owned by dbo by default, members of db_owners default to being owned by their login unless they qualify the object owner when they create it.
Andy
October 14, 2003 at 9:08 am
This happened to us too, after applying a service pack or hotfix for IE but I don't know how to fix it.
Glenn S. Hausler
Glenn S. Hausler
October 14, 2003 at 9:59 am
What happened? Applying a sp shouldnt change your role membership.
Andy
October 14, 2003 at 11:57 am
Just a small point. Aliases are provided for backward compatibility. How long that will stay around is a good question.
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
K. Brian Kelley
@kbriankelley
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply