An attempt to login using SQL authentication failed An attempt to login using SQL authentication failed sql-server sql-server

An attempt to login using SQL authentication failed


It looks like you will need to restart your SQL Server according to the MSDN link on enabling Mixed-Mode Authentication

There is another article (user comment at the bottom) referencing a registry key that you can look at; it also says you will need to restart the service once you have changed it.

From the first link:

To change security authentication mode:

  • In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.

  • On the Security page, under Server authentication, select the new server authentication mode, and then click OK.

  • In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.

To restart SQL Server from SQL Server Management Studio

  • In Object Explorer, right-click your server, and then click Restart. If SQL Server Agent is running, it must also be restarted.


You have to enable mixed mode server authentication:

enter image description here


After much research, I was able to connect my netbeans to my microsoft server.

If you registered your server as window authentication, you have to create another login which should be SQL Server Authentication, this will prompt you to input your username and password, create new, if you don't have any already existing login.

Map your new login to any database, preferably Master or Adventure...

Go to server manager configuration tool in your MSSQL folder in the start up menu,

Manager configuration tools ---> SQL Server services -----> select your server instance from the right pane, select MSSQLSERVER or MSSQLEXPRESS

whichever you know is your instance, preferably, work on the two of them, one after the other.

MSSQLSERVER express ---->under security----> Startup Parameters----> specify a parameter ---> type -m in the box ----> click on ADD.

CLick APPLY, then OK.

Do same to the MSSQLEXPRESS.

Restart the two of themGo back to your SQL management studio,Connect to server, select SQL SERVER AUTHENTICATIONInput your username and password, then ok.

Open your netbeans, right click your database, do your new connection stuff with the JDBC driver, input your login details of the SQL server...... connect.

It works perfectly well.

Remember to enable your TCP/IP Port remains 1433