Question

Error connecting to ms sql server

  • 1 April 2024
  • 6 replies
  • 29 views

Badge +2

Hi, I’m trying to connect Ms sql sever to AA . i have used connection string: jdbc:sqlserver://localhost;databaseName=Test;integratedSecurity=true;

Im getting error :

 


6 replies

Userlevel 5
Badge +11

Hi @mandarB ,

Have you installed the SQL Express...

if you have, please follow below :

 

The default SQL Server express installation does not enable TCP network protocols, so here are some steps to take to be able to communicate with SQL Server Express. These steps should be similar for MS SQL Server Express 2016, 2014, 2012, 2008, and 2005.

 

1. Launch the SQL Server Configuration Manager. It should be in the Start -> Programs -> Microsoft SQL Server XXXX-> Configuration Tools start menu option.

 

2. Select the SQL Server XXXX Network Configuration tab. There should be a Protocols for SQLExpress option, and one of the protocols should be TCP IP.

 

3. Enable the TCP IP protocol if it is not enabled.

 

4. The default port for SQL Express may not be 1433. To find the port it is listening on, right-click on the TCP IP protocol and scroll all the way down to the IP All heading. There should be a section called TCP Dynamic Ports. This should list the port SQL Express is listening on. You can then put this value into the port field when adding the connection profile

 

 

"You have to enable the 'Named Pipe' and 'TCP/IP' connection from 'SQL configuration manager'

Also ensure that the port 1433 is mentioned in TCP/IP properties as shown in the attached screenshot"

 

 

Make sure to restart SQL Express before trying to connect.

 

i hope this helps you to resolve the issue.

 

 

image

 
Badge +2

Hi i have done the above steps still im facing issues

 

Badge +2

TCP dynamic ports 0 so is this an issue..

 

Userlevel 5
Badge +11

 Please restart SQL Express before trying to connect

Badge +2

 

Userlevel 5
Badge +11

After changing the TCP Dynamic Ports to 0 is working?

Reply