How to enable remote login or SQL server authentication on SQL Server

Microsoft SQL Server undoubtedly is  the most reliable, capable of handling complex structured data. It is widely used as database for some big companies. And if you are a software developer, or you want to work with SQL server and your just beginner you first need to install SQL Server and SSMS (SQL server database management studio), follow this link for installation here.

If you are really beginner and got confused to connect SQL server using SQL Server Authentication, follow this steps.

1. Enable TCP/IP
This is the most important part. By default SQL server doesn't enable the TCP IP feuture probably for security reason. You need to enable that.

Open SQL Server Configuration manager, just search by press windows key. After it's open, expand SQL Server Network Configuration, and then click Protocols for .

The default instance (an unnamed instance) is listed as MSSQLSERVER. If you installed a named instance, the name you provided is listed. SQL Server 2012 Express installs as SQLEXPRESS, unless you changed the name during setup.

In the list of protocols, right-click the protocol you want to enable (TCP/IP), and then click Enable.


2. Allow SQL Server Authentication

This is also important part, when you install SQL server it allow only Windows authentication. So you need to allow both Windows authentication and SQL server authentication for login

To do that, right click on the object explorer Localhost or your PC-Name, right click on in it, choose Properties, and popup will show like the screenshot below.

After that, choose the Security tab on the sidebar, and then under Server authentication, select SQL Server and Windows Authentication Mode



3. Click OK to save the changes, and then you need to restart the SQL server


4. Create new login user
Then create new credentials with username and password, click: localhost (or your PC name) > security > logins > right click and new login.


Then fill the form: 
- login name: admin
- and enter your desired password
- checked SQL server authentication, instead of Windows authentication
- unchecked enforce password policy






5. Set a static port (skip this step if its already static)




You can use another port you want

6. To Restart SQL Server
If you don't know how to restart SQL server. There's GUI for that, open SQL Server Configuration manager, choose SQL server service at the left side bar, then right click on the SQL Server (MSSQLSERVER) at the right side, and choose to restart the services.



Now you can test by login using your new login username and password you created earlier.

If you still struggle connecting to your database, please refer to this official documentation : Lesson 2: Connecting from Another Computer

Popular posts from this blog

JavaFX Login Example Codes

Spring Kafka - how to use ReplyingKafkaTemplate send and reply synchronously

How To Create Spring Boot Project Using Netbeans

Upload and Download Rest API using Spring Boot Reactive WebFlux

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password