... and if you specify the correct port you dont need to specify the instance name, it just slows down resolving and need the SQL Browser service which is no longer available by default.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i'm trying to connect to a sqlserver with intance Name like "hostname\instance_name" and i got error "unknown server name" can you help me ?
thanks
RT
Dude, are you 100% sure that the hostname exists? Give a "ping hostname" a shot.
The connection string should be something like this:
jdbc:jtds:sqlserver://{HOSTNAME};instance={INSTANCE_NAME];...{rest of parameters}
jTDS does not support the naming convention "hostname\instance_name" like the Microsoft JDBC drivers does.
... and if you specify the correct port you dont need to specify the instance name, it just slows down resolving and need the SQL Browser service which is no longer available by default.