Error 15410
Contents |
create new user 0 I was in SSMS creating a new user using the SSMS GUI. This is for a user who will be doing some contract work for us. My boss wants me to give him just the ability to create/edit views and
Error 15410 Sql Server 2008
SPs. So, using the GUI I selected the databases he's to have access to, and sql error msg 15410 then I made sure that only public was selected as a database role membership. For one of the databases I was surprised grant db_owner to user sql server to see that db_owner was also selected. I have no idea why that would be, and I certainly don't want to give him that role membership. When I clicked the button to create a new SQL account I
Sp_addrolemember Db_owner
got the following error for that database: User or role '' does not exist in this database. (Microsoft SQL Server, Error: 15410) I've got a couple of questions about this. First, what does this error mean (my searches haven't yielded good results), and why would this database automatically want to add the user to that database role membership? more ▼ 0 total comments 1012 characters / 175 words asked May 24, 2010 at 01:53 PM in
Sql Server Dbo Permissions
Default Rod 801 ● 48 ● 51 ● 55 add new comment (comments are locked) 10|1200 characters needed characters left ▼ Everyone Moderators Original poster and moderators Other... Viewable by all users 3 answers: sort voted first ▼ oldest newest voted first 0 Usually the GUI is pretty good about this sort of thing, but it sounds like you haven't created the user yet. You have to have a login on the server that you then map to users in the database that you then grant permissions. I usually create roles with the permissions I want and then attach users to the roles. It's just easier. more ▼ 1 total comment 336 characters / 63 words answered May 24, 2010 at 03:06 PM Grant Fritchey ♦♦ 137k ● 20 ● 43 ● 81 Actually, I did create the user at the server level first, before attempting to add the user to the databases we want to give him access to. I hadn't considered creating a role; we haven't really done it before. In this case I think we're only going to need this guy to do a limited, focused activity, and then we're done. I guess I could create a role for that, but it seems a little overkill. Still, thank you for the suggestion. May 24, 2010 at 04:43 PM Rod add new
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn user or role does not exist in this database. more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges
Sql Server Db Owner Permissions
Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database sp_addrolemember db_datareader skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to https://ask.sqlservercentral.com/questions/7869/got-error-15410-when-attempting-to-create-new-user.html the top SQL-Server - Grant user DBO permission on database up vote 9 down vote favorite 2 I have a reporting database that I restore every night from a backup of the production database. When I restore, I need to add a user to the DBO role for that database. I thought this would work: use Restored_Prod go exec sp_addrolemember 'db_owner', 'chris' go But I get the following error, since that user doesn't exist in the Restored_Prod http://dba.stackexchange.com/questions/54389/sql-server-grant-user-dbo-permission-on-database database: Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 75 User or role 'chris' does not exist in this database. How do I add the user 'chris' to the database to be able to run the sp_addrolemember to make him a DBO of that database? Is there a way to add the user permissions using sp_addrolemember command from the master db where the user exists? sql-server-2008-r2 permissions share|improve this question asked Dec 3 '13 at 23:13 OrangeGrover 92138 add a comment| 1 Answer 1 active oldest votes up vote 19 down vote accepted User principals must exist in a database before you can grant them permissions. use Restored_Prod GO CREATE USER [chris] FROM LOGIN [chris]; exec sp_addrolemember 'db_owner', 'chris'; GO http://technet.microsoft.com/en-us/library/ms173463.aspx share|improve this answer answered Dec 3 '13 at 23:23 Mike Fal 8,1822748 That makes sense - I didn't know there was a distinction between login and user. Thanks –OrangeGrover Dec 3 '13 at 23:45 2 See this answer to a different question where I explain the login/user relationship in a little more detail. –Mike Fal Dec 4 '13 at 0:35 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By
Procedure sp_addrolemember, Line 75 User or role ‘mydomain\JShah' does not exist in this database. Cause Login already has an account under a different user https://sqldbpool.com/2009/07/22/msg-15410-level-11-state-1/ name on particular database. For example mydomain\JShah user is mapped to database as user name jshah Solution ALTER USER [jshah] WITH NAME=[mydomain\jshah] execute sp_AddRoleMember ‘DBRole','mydomain\jshah' OR We can pass the actual user name execute sp_AddRoleMember ‘DBRole','jshah' Share this:Share on Facebook (Opens in new window)Click to share on Tumblr (Opens in new window)Click to share on LinkedIn (Opens in new window)Click sql server to share on Reddit (Opens in new window)Click to print (Opens in new window)Click to share on Twitter (Opens in new window)Click to email (Opens in new window)Click to share on Google+ (Opens in new window)Click to share on Pinterest (Opens in new window)Like this:Like Loading... Related This entry was posted in SQL Server and tagged Errors. Bookmark the permalink. Post sql server db navigation ← Msg 15063, Level 16, State1 Insert Extended Character using OSQLUtility → Thanks for the comment, will get back to you soon... Jugal Shah Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. (LogOut/Change) You are commenting using your Twitter account. (LogOut/Change) You are commenting using your Facebook account. (LogOut/Change) You are commenting using your Google+ account. (LogOut/Change) Cancel Connecting to %s Notify me of new comments via email. Notify me of new posts via email. About MeJugal Shah is the author of this blog. He has 12 plus years of experience as Database Administrator and Developer in the Microsoft SQL Server and MySQL. Chat IMSQLDBPool@gmail.com Server Server MVP (2010, 2011, 2012 and 2013) SQLDBPool facebook Page SQLDBPool facebook Page Search @ SQLDBPOOL Search Click to subscribe to this blog Enter your email address to subscribe to this blog and receive notifications of new posts by email. Join 886 other followers Blog Readers 1,376,252