Forum Discussion
SQL Server fails login with password having semicolon
- Jun 10, 2022
Hi ACarrera1971
It can help if you provide us with the queries you run, because the mind reading ability of some of us does not work well. When you have an issue, then first of all you should describe what you did and as possible provide the tool to reproduce the case.
In general BY DEFAULT there is no issue in using semicolon in password. You can use any UNICODE character as well and not just English - Note that "can" DONT NOT mean "should"!
USE master GO CREATE LOGIN [RonenרונןWithsemicolon;] WITH PASSWORD = '[PassWithsemicolon;AndHebrewעברית]'; GO
The above code uses semicolon and Hebrew characters and it run without any issue.
Note! It is highly recommend NOT to use special characters in the LOGIN name, but for password it is a good idea to do so, with that said using non-English characters is not recommended if you cannot confirm that you will have option to use such chars anyway and everywhere.
HiACarrera1971 -- What is the state code associated with the Error 18456? Also, can you run the query below to ensure that mixed-mode authentication is enabled on the instance? Take care.
SELECT CASE
WHEN SERVERPROPERTY('isIntegratedSecurityOnly') = 1 THEN 'Windows-only authentication'
WHEN SERVERPROPERTY('isIntegratedSecurityOnly') = 0 THEN 'Mixed-mode authentication'
END AS AuthMode
- ACarrera1971Jun 10, 2022Copper Contributor
Hi bake13
Thanks for your answer. The authentication mode of the server I was testing on is "Mixed authentication mode", in fact I am trying to login using a SQL Server user, do you think it plays a role with this issue?
Really I am creating the login and updating the password using the SQL Server Management Studio.
I have been also trying to login using the SQL Management Studio and the error code 18456 is returned in the popup, I assumed it was the regular incorrect password.