Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Posts
    1

    Unanswered: how do i connect via jdbc using Windows authentication mode?

    What JDBC connection URL do I use to connect to SQL Server 2000 when the server is running in Windows authentication mode?

    I understand the difference between the Windows authentication mode and the combined Windows/SQL Server authentication modes (or at least i think i do) - i.e when running in Windows authentication mode, the server checks the connecting process's Windows user ID rather than a separate SQL user id.

    Fine, but then what URL do i use for the JDBC connection? Using the sql authentication i can do something like

    Properties props = new Properties();
    props.put("user", "sa");
    props.put("password", "password");
    props.put("db", "pubs");
    props.put("server", "localhost");
    Driver driver = (Driver)
    Class.forName("weblogic.jdbc.mssqlserver4.Driver") .newInstance();
    Connection conn = driver.connect("jdbc:weblogic:mssqlserver4", props);

    but this does not work when the server is running in windows authentication mode because the user "sa" is an sql user. The above code gives the error "Login failed .... not associated with a trusted SQL Server connection ..."

    What JDBC URL should I use then?????????????

  2. #2
    Join Date
    Nov 2002
    Posts
    1

    very good question

    I would really like to know the answer to this as well. Can't seem to find the right answer on the 'net so far... M

  3. #3
    Join Date
    Dec 2002
    Posts
    1

    Unhappy Re: very good question

    I have the same problem, I found the answer here:
    http://jtds.sourceforge.net/faq.html...Authentication
    Originally posted by tech@dercousa.c
    I would really like to know the answer to this as well. Can't seem to find the right answer on the 'net so far... M

Posting Permissions

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