Authenticating to a SQL Server instance as a Windows User via JDBC

后端 未结 9 1549
太阳男子
太阳男子 2020-12-06 06:37

I\'m having to support multiple database types for my tenant-enabled web application. Among others, I have successfully supported Microsoft\'s SQL Server, by using the net.s

9条回答
  •  我在风中等你
    2020-12-06 07:24

    Firstly you should write the jdbc connection like this:

    String url ="jdbc:sqlserver://PC01\inst01;databaseName=DB01;integratedSecurity=true";
    

    then

    you need to enable the SQL Server TCP/IP Protocol in Sql Server Configuration Manager app. You can see the protocol in SQL Server Network Configuration.

提交回复
热议问题