
Create failed for Login SQL Server authentication

1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Oct 31, 2023, 9:17 AM EDT
Hey Naresh, are you trying to create empty login?
CREATE LOGIN [] FROM WINDOWS WITH DEFAULT_DATABASE=[master]If we run above in the SSMS query window, we get above error message. Because login is created as [] and error clearly says that “[] are not allowed”. If we provide name, then the issue will be resolved.
For more info check the below link:
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-login-transact-sql?view=sql-server-2017