Microsoft Sql Server Error 15006
Contents |
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Create New Login Error 15006 SQL Server > SQL Server Data Access Question 0 Sign in to vote Hey, I'm is not a valid name because it contains invalid characters sql server 2008 trying to create New Login under the MSSM but i'm get this error can
Create User Is Not A Valid Name Because It Contains Invalid Characters
you please help me TITLE: Microsoft SQL Server Management Studio ------------------------------ Create failed for Login 'JAY-PC\SOna'. (Microsoft.SqlServer.Smo) ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ 'JAY-PC\SOna' is not a valid name because it contains invalid characters. (Microsoft SQL Server, Error: 15006) Friday, January 20, 2012 7:32 PM Reply | Quote Answers 0 Sign in to vote JAY-PC\SOna isthe format ofWindows login. (Windows authentication on the General page when creating a new login) This user will have to exist on your pc before you can use it. JAY-PC\SOnacannot be used for a SQL loginname as \ is not allowed. (SQL Server authentication on the General page when creating a new login). Edited by KevinNicholas Friday, January 20, 2012 11:07 PM Marked as answer by KJian_ Thursday, February 02, 2012 3:28 AM Friday, January 20, 2012 11:02 PM Reply | Quote All replies 0 Sign in to vote When you are creating the Login are you using the below WINDOWS syntax e.g CREATE LOGIN [JAY-PC\SOna] FROM WINDOWS .... Friday, January 20, 2012 8:17 PM Reply | Quote 0 Sign in to vote Forgot to mention if you're using ssms you'll need to select the 'Windows authentication' option for non-SQL Server logins. Friday, January 20, 2012 9:07 PM Reply | Quote 0 Sign in to vote so far you says I have to SELECT Windows authentication? but I want to create Login Id for Non-windows user and I'm SELECT Non-windows as well and put the password but it showing this Error. Friday, January 20, 2012 10:50 PM Reply | Quote 0 Sign in to vote JAY-PC\SOna isthe format ofWindows login. (Windows authentication on the General page when creating a new login) This user will have to exist on your pc before you can use it. JAY-PC\SOnacannot be used for a SQL loginname as \ is not allowed. (SQL Server authentication on the General page when creating a new login). Edited by KevinNicholas Friday, January 20, 2012 11:07 PM Marked as
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 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 6.2 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 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/2e3c7a10-a648-4d0a-8b85-97908e8a2cf5/create-new-login-error-15006?forum=sqldataaccess 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 64131422 add a comment| 2 Answers 2 http://stackoverflow.com/questions/24660151/error-when-trying-to-create-new-login-user-for-sql-2012 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,34221218 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, add FROM WINDOWS. I gave you a code snippet above, Please try again. –CRAFTY DBA Jul 9 '14 at 18:01 It worked. One thousand thanks –Ben Junior Jul 9 '14 at 18:31 add a comment| up vote 0 down vote Ben answered his own question: UPDATE: Just to clarify: The "Invalid character"
your question and get tips & solutions from a community of 418,590 IT Pros & Developers. It's quick & easy. Login With Domain Account P: n/a Jason I doing some testing with security and ran into the following problem. I want https://bytes.com/topic/sql-server/answers/82678-login-domain-account to log into the SQL server (from 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 http://blog.sqlauthority.com/2009/08/20/sql-server-fix-error-cannot-open-database-requested-by-the-login-the-login-failed-login-failed-for-user-nt-authoritynetwork-service/ I am to log in with no problems. But if it is set to SQL Server authentication and I type in my username (in the format domain\username or username@domain) and password I get a login error. Is there a way to sql server 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"
SERVER - FIX : ERROR : Cannot open database requested by the login. The login failed. Login failed for user ‘NT AUTHORITY\NETWORK SERVICE'. August 20, 2009Pinal DaveSQL, SQL Server, SQL Tips and Tricks192 commentsThis error is quite common and I have received it few times while I was working on a recent consultation project.Cannot open database requested by the login. The login failed. Login failed for user ‘NT AUTHORITY\NETWORK SERVICE'.This error occurs when you have configured your application with IIS, and IIS goes to SQL Server and tries to login with credentials that do not have proper permissions. This error can also occur when replication or mirroring is set up.If you search online, there are many different solutions provided to solve this error, and many of these solutions work fine. However, I will be going over a solution that works always and is very simple.Fix/Workaround/Solution:Go to SQL Server >> Security >> Logins and right click on NT AUTHORITY\NETWORK SERVICE and select PropertiesIn newly opened screen of Login Properties, go to the “User Mapping” tab. Then, on the “User Mapping” tab, select the desired database – especially the database for which this error message is displayed. On the lower screen, check the role db_owner. Click OK.In almost all such cases, this should fix your problem.Reference : Pinal Dave (http://blog.sqlauthority.com) Tags: SQL Error Messages, SQL Login, SQL Scripts, SQL Server Security3Related Articles SQL SERVER - Select and Delete Duplicate Records - SQL in Sixty Seconds #036 - Video December 19, 2012Pinal Dave SQL SERVER - UDF - Remove Duplicate Chars From String December 5, 2007Pinal Dave SQL SERVER - Disabled Index and Index Levels and B-Tree September 14, 2010Pinal Dave 192 comments. Leave new Jay May 21, 2014 7:20 pmAwesome solution, thanks a load :)Reply alireza June 28, 2014 11:52 amtank you v