JDBC connection string with instance name and domain

后端 未结 2 1163
日久生厌
日久生厌 2020-12-20 16:15

I have a database created in SQL Server with the following configuration:

Also, I am trying to connect to the database named EDS.

For that I cre

2条回答
  •  春和景丽
    2020-12-20 17:08

    I'm also having the same problem. Working for me too without port number. Don't forget to give semicolon at the end of the connection.

    Connect to the default database on the local computer by using integrated authentication:

    jdbc:sqlserver://localhost;integratedSecurity=true;
    

    Connect to a named database on a remote server:

    jdbc:sqlserver://localhost;databaseName=AdventureWorks;integratedSecurity=true;
    

    Connect on the default port to the remote server:

    jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;integratedSecurity=true;
    

    Connect by specifying a customized application name:

    jdbc:sqlserver://localhost;databaseName=AdventureWorks;integratedSecurity=true;applicationName=MyApp;
    

    Reference Link : mssql document

提交回复
热议问题