Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS SQL Server: allow connections to datasource\namedInstance #256

Merged
merged 1 commit into from
Mar 22, 2014

Conversation

javornikolov
Copy link
Contributor

There used to be explicit check which forbids connection via dataSource = host\<instance name>. That seems to be working fine now (tested with SQL Sever Express 2014) so I'm removing this restriction.

Example connection definitions which work fine with named instances:

  • Via backslash prefix:
!|Connect|myhost\myinstance|myuser|mypassword|mydbname|
  • By setting parameter instanceName=...:
!|Connect|myhost;instanceName=myinstance|myuser|mypassword|mydbname|
  • Via raw JDBC URL works too:
!|Connect|jdbc:sqlserver://myhost\myinstance;user=myuser;password=mypassword;databaseName=mydbname|

Connection to named instance requires MS SQL Server Browser service to be up and running and allowed by firewalls (if any). Each database should be also configured to accept TCP/IP connections (including allowance in firewall if any).

This targets to fix #120

There used to be explicit check which forbids connection via
dataSource = host\<instance name>.
That seems to be working fine now so I'm removing this restriction.
benilovj added a commit that referenced this pull request Mar 22, 2014
…ring-support

mssql: allow connect to to datasource\namedInstance
@benilovj benilovj merged commit 8623932 into master Mar 22, 2014
@benilovj benilovj deleted the mssql-named-instance-connection-string-support branch March 22, 2014 15:46
@benilovj
Copy link
Member

Separately from this change, what I've always wanted to do but never got around to was to document the different ways to build the connection string for SQL Server, like you described in the PR description.

One question that comes up again and again on the forums is how to connect to SQL Server....

@benilovj benilovj added this to the 3.0.0 milestone Mar 22, 2014
@benilovj benilovj changed the title mssql: allow connect to to datasource\namedInstance MS SQL Server: allow connect to to datasource\namedInstance May 5, 2014
@benilovj benilovj changed the title MS SQL Server: allow connect to to datasource\namedInstance MS SQL Server: allow connections to datasource\namedInstance May 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java SQL Server Driver does not work with instance names
2 participants