Products | Versions |
---|---|
Spotfire Server | All Versions |
SQL Server allows the installation of multiple database instances per server. Below are the JDBC url examples to connect to SQL Server with named instance
jdbc:sqlserver:// (Required) is known as the subprotocol and is constant.
serverName (Optional) is the address of the server to connect to. This could be a DNS or IP address, or it could be localhost or 127.0.0.1 for the local computer. If not specified in the connection URL, the server name must be specified in the properties collection.
instanceName (Optional) is the instance to connect to on serverName. If not specified, a connection to the default instance is made.
e.g. jdbc:sqlserver://test-server\sqlexpress:1433;databaseName=master;
Option 2
Below is the url where we specify the instance name as a JDBC URL property, if no instance name or port number property is specified, a connection to the default instance is created