Error 15410 User Or Role
Contents |
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Getting a "User or role microsoft sql server error 15410 '[DomainUsersAccess]' does not exist in this database." error SQL Server > error 15410 sql server 2008 SQL Server Express Question 0 Sign in to vote I've got a SQL Server 2008 R2 Express grant db_owner to user sql server database. We're working on a WPF app, that's going to use this database, which will be installed on each users' desktop/laptop. We want it so that access to
User Or Role Does Not Exist In This Database.
the SQL Express database will be handled by Windows authentication, so if a domain user is logged in he/she can access the data. The database is named ASI. The plan is to create a new role, assign the db_datareader and db_datawriter roles to this new role, associate a user in SQL for all domain users and sp_addrolemember db_owner associate the new, custom role with all domain users. We've got a group in our AD named "Domain Users", and that's what I was going to associate with the user in SQL. However, I'm getting an error trying to do this, I don't have to give a lot of lines to illustrate where the error occurs. Here's the SQL: USE ASI GO CREATE ROLE [DomainUsersAccess] --give my new role appropriate permission to ALL tables EXEC sp_addrolemember N'db_datareader', N'[DomainUsersAccess]' EXEC sp_addrolemember N'db_datawriter', N'[DomainUsersAccess]' The error occurs on the 2 calls (I'm getting 2 error messages, and they're identical) to sp_addrolemember. The error reads as follows: Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 75 User or role '[DomainUsersAccess]' does not exist in this database. Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 75 User or role '[DomainUsersAccess]' does not exist in this database. In looking at my ASI database, I can clearly see that the new role DomainUsersAccess is in it. So, why is the sp_addr
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 sql server dbo permissions Stack Overflow the company Business Learn more about hiring developers or posting ads with
Alter Role Db_owner Add Member
us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site
Cannot Alter The Role 'db_owner', Because It Does Not Exist Or You Do Not Have Permission.
for database professionals who wish to improve their database 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 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/55f08311-ea4b-485e-8d8f-3dbf7f7ca13a/getting-a-user-or-role-domainusersaccess-does-not-exist-in-this-database-error?forum=sqlexpress can answer The best answers are voted up and rise to 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 http://dba.stackexchange.com/questions/54389/sql-server-grant-user-dbo-permission-on-database 'db_owner', 'chris' go But I get the following error, since that user doesn't exist in the Restored_Prod 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 draf
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 name on particular database. For example mydomain\JShah https://sqldbpool.com/2009/07/22/msg-15410-level-11-state-1/ 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 http://scexblog.blogspot.com/2015/12/new-ad-user-login-not-reflecting-in-sql_16.html (Opens in new window)Click to share on Tumblr (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Reddit (Opens in new window)Click to print (Opens in new window)Click sql server 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 navigation ← Msg 15063, Level 16, State1 Insert Extended Character using OSQLUtility → Thanks for the comment, will get back to user or role 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 Readers Grab this badge here! Disclaimer This is a personal blog. The opinions expressed here represent my own thoughts and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet/ BOL. My employer do not endorse any t
component to critical status. The warning message is as below: Microsoft SQL Server reported SQL message 15410, severity 11: [42000][15410][Microsoft][SQL Server Native Client 11.0][SQL Server]User or role 'DOMAIN\SC-Admins' does not exist in this database. : sp_addrolemember My next action is try to create the login manually inSQL Server Management Studiobutended up with this SQL Error 15025, saying that the account is already exists. After some searching and understanding with Mr.Customer, I found out that the login name is changed in the Active Directory but the SQL server is still having the old login name. Instead of deleting the old login from SQL and recreate a new login. I used ALTER LOGIN to fix the problem. So just open up New Query in the SQL Server Management Studio. Enter and run the command below to alter the login ALTER LOGIN [DOMAIN\Admins] WITH NAME = [DOMAIN\SC-Admins] Command Guide:ALTER LOGIN [DOMAIN\OldLogin] WITH NAME = [DOMAIN\NewLogin] Regards,Hau Posted by Hau at 10:04 AM Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: ConfigMgr, Configuration Manager, SCCM, SQL No comments: Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Total Pageviews About Me Hau Hau is a technical consultant at Infront Consulting Group. He is also an Microsoft MVP for Enterprise Client Management. His main focus is around Configuration Manager, SCCM, EMS and Microsoft Intune. View my complete profile Labels 1511 Active Directory Announcement App-V 5.0 Applocker APPV BitLocker Client Push ConfigMgr Configuration Manager Custom Reports Deploy Expert Distribution Point Endpoint Protection GPO Hyper-V IIS IPv6 MAM Managed Apps Management Point MBAM MDM MDT MDT 2012 Med-V 2.0 MEDV Microsoft Intune Office 365 OOB OSD Out Of Band Powershell Reporting Right Click Tools SCCM SCCM 1511 SCCM 1602 SCCM 2012 SCCM 2012 R2 SCCM 2012 SP1 SCCM CB SCCM Current Branch SCEP Schema Extension SCUP Sequencing Recipe SQL Symantec System Center 2012 R2 UNIX Linux USMT Virtual PC 2007 VPro WDS Windows 10 10586 Upgrade Windows 7 Windows 8.1 Windows Intune Windows Server 2003 Windows Server 2008 Windows Server 2012 Windows Server 2012 R2 Windows Virtual PC Windows XP Mode WMI Query WSUS Popular Posts (30 days) Call to HttpSendRequestSync failed for port 80 with status code 500, text: Internal Server Error Failed to Run Task Sequence; Error 0x80004005 While Retrieving Policy SCCM 2012 R2: VPN Profiles Step-by-step Guide Could not conn