Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002

    Unanswered: Named Instance of SQL Server in Java

    I have a java compiled jar file, which accept the connection string as follows: -Uusername -Ppassword -Sservernameort

    This string works fine with the default instance of SQL Server, I mean as long as you supply the name of the SQL Server as 'SQLServer', but if I want to run it against the named instance of SQL Server like 'SQLSERVER\NamedInstance' then the connection is failing, giving me the unknown host error. Any idea why?

  2. #2
    Join Date
    Nov 2003

    Re: Named Instance of SQL Server in Java

    I've got this connection string

    driver={SQL Server};server=MachineName\Mercure;uid=sa;pwd=pwd

    I've created the instance name during the installation of MSDE
    and it seems that SQL Server was installed with the computer name


    Computer Name
    The Computer Name dialog box in Setup allows you to install Microsoft SQL Server 2000 on your local computer, on a remote computer, or on a virtual server.

    All options for installing and upgrading are available on the local computer. Advanced options, including registry rebuild, unattended installation, and upgrading to a cluster are not available on a remote installation. If you are running Setup on a clustered computer, the Virtual Server option is available.

    Local Computer

    By default, the name in the edit box is the local machine name, that is, the computer on which Setup is running. For a local installation, accept the default and click Next.

    Note If you are installing tools only, Local Computer will be the only option available on this dialog box.

    Remote Computer

    Enter a computer name for a remote installation, or click Browse to locate the remote computer.

    Virtual Server

    Enter the name of a new or existing Virtual SQL Server to manage.

    This option is available only when Microsoft Cluster Service (MSCS) is detected on an Windows NT or Windows 2000 Enterprise operating system.


    Click the Browse button to locate a remote computer.

    This button is available only when the Remote Computer option is selected.

  3. #3
    Join Date
    Sep 2003
    What JDBC driver are you using? If it's Microsoft's then it does support named instances. I think this was introduced in SP2 of the JDBC driver. Let me know and I'll post and example. If it's another jdbc driver usually you can supply the port number the instance is running in the connection string.

  4. #4
    Join Date
    May 2002

    This worked


    where 1599 is the Named Instance Port number

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts