Error 15006 Sql Server 2005
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and is not a valid name because it contains invalid characters sql server 2008 policies of this site About Us Learn more about Stack Overflow the
Create User Is Not A Valid Name Because It Contains Invalid Characters
company Business Learn more about hiring developers or posting ads with us Stack 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
up 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, http://stackoverflow.com/questions/24660151/error-when-trying-to-create-new-login-user-for-sql-2012 2010 8:35 AM 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 http://www.sqlservercentral.com/Forums/Topic1039121-391-1.aspx a login that 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
your question and get tips & solutions from a community of 418,504 IT Pros & Developers. It's quick & easy. Login With Domain Account P: n/a Jason I doing some testing with security https://bytes.com/topic/sql-server/answers/82678-login-domain-account and ran into the following problem. I want to log into the SQL server (from http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=194927 Query Analyzer) using my domain account. To allow this, I went into Logins section in Enterprise Manager and added my user account as a Windows User. If I set Analyzer to use Windows authentication I am to log in with no problems. But if it is set to SQL Server authentication and I type in my username (in sql server the format domain\username or username@domain) and password I get a login error. Is there a way to login in to SQL using domain account without using windows authentication? Thanks, Jason Jul 20 '05 #1 Post Reply Share this Question 2 Replies P: n/a John Bell Hi If you are wanting to use the windows accounts to log into the database server, then you will have to use windows authentication. John "Jason"
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! 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 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 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 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 F