• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Datasource for non-default instance of SQL Server

 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

We are experiencing this situation now. On our database server, we are planning to create a non-default instance of the SQL Server Database.

On our application server, we need to configure a datasource to point to this database, which will be looked up by the application code and used for connectivity.

The information will look something like this.

Datasource Name : java:comp/env/jdbc/mysqlserver.mysite.com
Driver : net.sourceforge.jtds.jdbc.Driver
Connection URL : jdbc:jtds:sqlserver://mysqlserver.mysite.com:1433

Here, 1433 is the default port to which the default instance of the SQL will be listening to. If we create a non-default instance, the port will change, and the name of the datasource will change too.

In that case, how do we create the datasource for the non-default instance?
How would the URL field look like, provided we have the host:port info.

Requesting you to kindly help me. Thanks in advance for the reply!!
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An "instance" in SQL Server terms is a distinct server, not a database. Is it an instance you mean? If it is I think you address it by simply changing the port numebr to the number the named instance is listening on.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic