07/2021

How to Connect to Your SQL Database Using the SQL Port Number

0  comments

If you want to connect to your SQL database using the SQL port number, there are a few things you need to know. In this blog post, we will explain what the SQL port number is and how to connect to your SQL database using the hostname and port number.

SQL Server default port is 1433. If you want to change the port number, you can do so by going to SQL Server Configuration Manager. In the left-hand pane, expand SQL Server Network Configuration and then select Protocols for SQLEXPRESS. In the right-hand pane, double-click TCP/IP.

Many times SQL Server database is not running on the default port 1433. In this situation connecting with DBHawk is straight forward.

You can enter the different port on port number field. E.g with following screenshot, enter host name and the port number.

SQL Port Non Default Port connection

Connect to a different port with DBHawk

If you need to connect to the non default port with SQL Server database, you need to use the syntax "serverName,portNumber" when connecting. For example, if your server name is "MyServer" and the port number is "1234", you would use the following connection string:

server=MyServer,1234;database=myDatabase;integrated security=true;

When connecting with Microsoft SQL Server Management studio, enter port number with comma.

SQL Port non default connection with SQL Server Management Studio

Connect to a different port with SQL Server Management Studio

Here in Sever name field, entered host IP address and port number separated with comma.

Find out more about Microsoft SQL Server data tools at MSSQL Client


Tags


You may also like

Try all these features now

Our free trial includes all of the basic features plus premium access