Microsoft Sql Server 2012 Error 15007
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums is not a valid login or you do not have permission sql server 2008 r2 Answered by: Error Creating User on Database SQL Server > msg 15007, level 16, state 1 SQL Server Express Question 0 Sign in to vote Hi there, I am sql server 2012 create user setting up a database for the first time using SQL Server Express. I have managed to create a database and create a table with create login sql server data etc, all straight forward. The problem I am having is when I come to creating a user for the database. I have the following users in there already, which I am guessing are put in by default: dbo guest INFORMATION_SCHEMA sys When I try creating a new user via this screen I get the following error: TITLE: Microsoft SQL Server Management Studio Express------------------------------ Create failed for User 'growstudiouser'. (Microsoft.SqlServer.Express.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+User&LinkId=20476 ------------------------------ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo) ------------------------------ 'growstudio' is not a valid login or you do not have permission. (Microsoft SQL Server, Error: 15007) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15007&LinkId=20476 ------------------------------ I was wondering if anybody could advise me as to what I'm doing wrong. I am typing in the name as "growstudiouser" and the login name as "growstudio". Or am I just using the wrong section to do what I want. I'm trying to create a user so that when the database is built I can connect to it using a username and password that I have created. I'm not sure I'm taking to the correct route as there is n
up Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 2008 » SQL Server 2008 - General » Minimum rights required to add users to a DB Minimum rights required to add users to a DB Rate Topic Display Mode Topic Options Author Message OldskoolOldskool Posted Tuesday, July 9, 2013 9:22 AM Forum Newbie Group: General Forum Members Last Login: Tuesday, July 16, 2013 10:44 AM Points: 7, Visits: 29 Hi AllWe run both SQL 2008/2012 but this question stands https://social.msdn.microsoft.com/Forums/sqlserver/en-US/80c39b2d-cc46-4bb4-8570-f1d2885a2cef/error-creating-user-on-database?forum=sqlexpress for both versions.I would like to delegate permissions to our helpdesk so that they can add new (SQL authenticated) user accounts to a particular DB then assign the db_datareader & db_datawriter roles to the account.So, in Management Studio I have created a SQL login for the Helpdesk AD group and assigned the securityadmin server role, then gone to the relevant DB and assigned the db_securityadmin and db_access http://www.sqlservercentral.com/Forums/Topic1471700-391-1.aspx admin roles for this group.Problem is that when the Helpdesk try to create a new user for this DB they can create a server login but get the following error when assigning DB roles to that user:TITLE: Microsoft SQL Server Management Studio------------------------------Add member failed for DatabaseRole 'db_datareader'. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Add+member+DatabaseRole&LinkId=20476------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------I cancel out of the message only to find that the server login has been created for the new user but not the DB assignments.The only way I have found to get around this is to assign the Helpdesk group to DBO DB role but this is just too permissive for them. Surely there is a way to do this without assign DBO for the Helpdesk??Thanks in advance Post #1471700 LowellLowell Posted Tuesday, July 9, 2013 9:47 AM SSChampion Group: General Forum Members Last Login: Yesterday @ 8:48 AM Points: 14,480, Visits: 38,149 how about creating a procedure that runs under elevated privilesges, and give the helpdesk permissions to that?here's just one example:CREATE procedure pr_CallBoostedSecurityProcess( @name varchar(128), @password varchar(128) ) WITH EXECUTE AS 'superman' --this is a sysadmin login and also database user --(only database users can be
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close https://www.experts-exchange.com/questions/28480582/I-am-trying-to-add-a-login-to-a-sql-server-express-database-but-am-getting-an-error.html Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store http://www.codeproject.com/Questions/405474/How-can-I-create-a-new-user-in-MS-Sql-Server Headlines Experts Exchange > Questions > I am trying to add a login to a sql server express database but am getting an error Want to Advertise Here? Solved I am trying to add a login to a sql server express database but am getting an error Posted on 2014-07-21 MS SQL Server 1 Verified Solution 4 Comments 756 Views Last sql server Modified: 2014-07-22 I don't know a lot about SQL server Express but I need to create a login account so that I can connect with something other than windows authentication. I'm trying the following (password blanked out for security) but I'm getting errors. Does anyone know what I'm doing wrong? Nothing is connected to the database other than SQL Server Management Studio. USE [master] GO CREATE LOGIN [LEadmin] WITH PASSWORD=N'******' MUST_CHANGE, DEFAULT_DATABASE=[LE_tool_sql2SQL], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=ON, CHECK_POLICY=ON GO sql server 2012 EXEC master..sp_addsrvrolemember @loginame = N'LEadmin', @rolename = N'dbcreator' GO EXEC master..sp_addsrvrolemember @loginame = N'LEadmin', @rolename = N'securityadmin' GO EXEC master..sp_addsrvrolemember @loginame = N'LEadmin', @rolename = N'sysadmin' GO USE [LE_tool_sql2SQL] GO CREATE USER [LEadmin] FOR LOGIN [LEadmin] GO Getting the following errors Msg 945, Level 14, State 2, Line 1 Database 'LE_tool_sql2SQL' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. Msg 15007, Level 16, State 1, Procedure sp_addsrvrolemember, Line 68 'LEadmin' is not a valid login or you do not have permission. Msg 15007, Level 16, State 1, Procedure sp_addsrvrolemember, Line 68 'LEadmin' is not a valid login or you do not have permission. Msg 15007, Level 16, State 1, Procedure sp_addsrvrolemember, Line 68 'LEadmin' is not a valid login or you do not have permission. Msg 945, Level 14, State 2, Line 1 Database 'LE_tool_sql2SQL' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. Msg 15007, Level 16, State 1, Line 1 'LEadmin' is not a valid login or you do not have permission. 0 Question by:boukaka Facebook Twitter LinkedIn Google LVL 14 Best Solution byVikas Garg Hi, There may be two reasons for this 1. That you don't have Sysadmin rights to the database on which you are trying to create login
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick answersQ&A Ask a Question View Unanswered Questions View All Questions... Linux questions C# questions ASP.NET questions SQL questions fabric questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ How can I create a new user in MS-Sql Server 2005 Rate this: Please Sign up or sign in to vote. See more: C#2.0 C#3.0 C# ASP.NET ADO.NET , + USE [master] GO CREATE LOGIN [shi] FROM WINDOWS WITH DEFAULT_DATABASE=[master] GO EXEC master..sp_addsrvrolemember @loginame = N'shi', @rolename = N'sysadmin' GO USE [SMS2] GO CREATE USER [shi] FOR LOGIN [shi] GO USE [SMS2] GO ALTER USER [shi] WITH DEFAULT_SCHEMA=[dbo] GO Getting Exception: Msg 15407, Level 16, State 1, Line 1 'shi' is not a valid Windows NT name. Give the complete name: