Skip to main content
Question

Error connecting to ms sql server

  • April 1, 2024
  • 6 replies
  • 133 views

mandarB
Forum|alt.badge.img+9

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

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • April 2, 2024

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

 

mandarB
Forum|alt.badge.img+9
  • Author
  • Navigator | Tier 3
  • April 2, 2024

Hi i have done the above steps still im facing issues

 


mandarB
Forum|alt.badge.img+9
  • Author
  • Navigator | Tier 3
  • April 2, 2024

TCP dynamic ports 0 so is this an issue..

 


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • April 2, 2024

 Please restart SQL Express before trying to connect


mandarB
Forum|alt.badge.img+9
  • Author
  • Navigator | Tier 3
  • April 2, 2024

 


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+18
  • Most Valuable Pathfinder
  • April 2, 2024

After changing the TCP Dynamic Ports to 0 is working?