Error 15006 In Sql Server 2005
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 is not a valid name because it contains invalid characters sql server 2008 the company Business Learn more about hiring developers or posting ads with us Stack create user is not a valid name because it contains invalid characters Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error when trying to create new Login user for SQL 2012 up vote 2 down vote favorite I'm trying to follow the procedures described in this link here but if I enter IIS APPPOOL\AppPoolName as the login name (as in step 3) it throws an error saying that it is not a valid name because it contains invalid characters. I'm using SSMS for SQL 2012. UPDATE: Just to clarify: The "Invalid character" error was b/c I was trying to enter the user on "SQL Server Authentication" when it must be "Windows Authentication". sql-server share|improve this question edited Jul 11 '14 at 3:08 asked Jul 9 '14 at 17:26 Ben Junior 64131421 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote accepted here is some sample TSQL code from one of my blogs to create a login and user. http://craftydba.com/?p=656 It does not like the . Put in in brackets. [] -- Delete existing login. IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'BSA_USER') DROP LOGIN [BSA_USER] GO -- Add new login. CREATE LOGIN [BSA_USER] WITH PASSWORD=N'M0a2r0c9h11#', DEFAULT_DATABASE=[BSA] GO -- Delete existing user. IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'BSA_USER') DROP USER [BSA_USER] GO -- Add new user. CREATE USER [BSA_USER] FOR LOGIN [BSA_USER] WITH DEFAULT_SCHEMA=[dbo] GO Change the syntax for a Windows Account. -- Using users naming ... CREATE LOGIN [APPPOOL\MyAppPool] FROM WINDOWS WITH DEFAULT_DATABASE = [MyDatabase] GO share|improve this answer edited Jul 9 '14 at 18:01 answered Jul 9 '14 at 17:30 CRAFTY DBA 7,31421218 Thanks for your reply. Here is the msg after I executed your script: Msg 15006, Level 16, State 1, Line 2 'IIS APPPOOL\MyAppPool' is not a valid name because it contains invalid characters. –Ben Junior Jul 9 '14 at 17:46 Please see above, if windows account,
Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 2008 » SQL Server 2008 - General » Problems adding a new Login Problems adding a new Login Rate Topic Display Mode Topic Options Author Message Michael Lee-158245Michael Lee-158245 Posted Friday, December 24, 2010 8:35 AM http://stackoverflow.com/questions/24660151/error-when-trying-to-create-new-login-user-for-sql-2012 SSC Rookie Group: General Forum Members Last Login: Monday, February 11, 2013 7:32 AM Points: 36, Visits: 120 Hi All,I'm having a issue adding a new login only if I set it to SQL Server Authentication and I set the password. I'm trying to add a login that http://www.sqlservercentral.com/Forums/Topic1039121-391-1.aspx was created on our domain with admin security rights. Info:New User ID = FREEDOM\SqlAgentWorkerI get the following error TITLE: Microsoft SQL Server Management Studio------------------------------Create failed for Login 'FREEDOM\SqlAgentWorker'. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1015+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------'FREEDOM\SqlAgentWorker' is not a valid name because it contains invalid characters. (Microsoft SQL Server, Error: 15006)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=15006&LinkId=20476Please Note: If I add the user Id using Windows Authentication it works without any issues. I have not tried to remove the FREEDOM\ part, but I thought that it would be needed for proper identification. Since I could not get it to work right in SQL Management Studio, I tried the following command:CREATE LOGIN [FREEDOM\SqlAgentWorke] from WINDOWS WITH PASSWORD='91464502599'GOQuestions:A. Can I use "From Windows" and "with PASSWORD" in the same command. If not, How would I set the password, or does SQL Serv
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=194927 We've restricted the ability to create new threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get your question answered! Username: Password: Save http://www.sqlserverf1.com/tag/is-not-a-valid-name-because-it-contains-invalid-characters/ Password Forgot your Password? All Forums SQL Server 2008 Forums SQL Server Administration (2008) cant create a user when using iis appPool\ Reply to Topic Printer Friendly Author Topic barnsley Starting sql server Member 34 Posts Posted-06/27/2014: 07:23:23 I am try to create a user in SQL 2008.It is for a DotNetNuke (DNN) CMS.I have put this problem on DNN forum, but nobody seems to understand the problem :- I think this is a SQL issue.we are using: windows 2008 r2, SQL 2008, ASP.net4, and IIS7.I believe that because we are using Windows 2008 r2 is not a that we must prefix our username with iis appPool\ However, this results in an error when using the backslash...ERROR is something like this:"...iis apppool\[myUserName] is not a valid name because it contains invalid characters error code: 15006..."any ideas as to why this is please?mark. James K Flowing Fount of Yak Knowledge 3873 Posts Posted-06/27/2014: 10:40:13 The correct syntax is [apppool\myUserName], but I am not commenting on whether or not that is the correct username to provide.As an aside, in SQL, there is the concept of a login - which is a server level entity that allows someone to connect to the sever and then there are users which are entities associated with databases. A user can be associated with a login, which then would give that login access to the resources on the database accessible to that user. http://msdn.microsoft.com/en-us/library/ms181127.aspx barnsley Starting Member 34 Posts Posted-06/27/2014: 11:51:53 thanks,I tried both "iis apppool\myUserName"and"apppool\myUserName"I get the same error.It is for creating a new loginmark. James K Flowing Fount of Yak Knowledge 3873 Posts Posted-06/27/2014: 14:00:32 I suspect that neither of them is correct. SQL Server allows two types of
Tag: is not a valid name because it contains invalid characters Azure SQL Database General Error Messages From Error 15006 to 40512 February 9, 2015 SQLServerF1 Leave a comment Msg 15006, Level 16, State 1, Line 1 SQL Azure Error: 15006, Severity: 16, State 1, Line 1