Answer the question
In order to leave comments, you need to log in
How to connect to ms sql server?
Hello I am having some difficulty connecting to ms sql from my spring boot application.
I downloaded and installed ms sql and management studio created a table in it and now I want to display data from it on a web page.
in the property i put this :
# ===============================
# DATABASE CONNECTION
# ============== =================
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.datasource.url=jdbc:sqlserver://localhost; databaseName=Test
spring.datasource.username=mssql
spring.datasource.password=mssql
com.microsoft.sqlserver.jdbc.SQLServerException: A TCP/IP connection could not be established to server localhost on port 1433. Error: "Connection refused: connect. Check connection properties.
Answer the question
In order to leave comments, you need to log in
Check if it is enabled and activated ( two settings) for you TCP/IP
.
Find where SQLServerManager*.msc
and run.
The command where SQLServerManager*.msc
is the search. The default file should be in C:\Windows\System32
. Must be in all editions, it is impossible to disable the installation.
What is the mssql account type? Windows or SQL?
jdbc:sqlserver://localhost;instanceName=SQLEXPRESS;DatabaseName=test;integratedSecurity=true
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question