question

namcit avatar image
namcit asked

How to add a user in SQL server 2012

I could connect SQL server 2012 by Windows Authentication. Because i use destop.No network. I add user aaa and connect as SQL authentication.But i get error 18456. When i install SQL server i forget choice SQL authentication. I remember i do not type password for "sa" Please help me
sql server 2012
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DenisT avatar image DenisT commented ·
If you can connect to SQL Server instance using Windows Authentication, connect to the instance using Windows Authentication using SSMS right click on the instance name and then click on Security. There will be an option called "Server authentication" --> SQL Server and Windows Authentication should be the one you need checked. Make sure to disable the sa account! Also, I guess if you are asking you have to use SQL Server authentication, but I'd try to avoid it. It's just not secure.
0 Likes 0 ·
namcit avatar image namcit commented ·
my situation has beeb solved.thanks you so much
0 Likes 0 ·
ThomasRushton avatar image ThomasRushton ♦♦ commented ·
For future reference, if you look at the State code from your error 18456, you'll get more information about the failure. (NB: this might not be reported back to your client, so you may have to dig around in the SQL Server logs themselves...) There's a list of some state codes and their causes / resolutions at Aaron Bertrand's blog - http://sqlblog.com/blogs/aaron_bertrand/archive/2011/01/14/sql-server-v-next-denali-additional-states-for-error-18456.aspx
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.