Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2012
    Posts
    2

    Unanswered: Connect to MSSQL on remote, with windows authentication, JAVA

    Hi everyone,

    I want to do the same things on lots of MSSQL 2008 servers which are installed on the remote desktops. I have the windows server login information of the servers. And that login user can connect to MSSQL server. (I mean I can connect to MSSQL server via Windows Authentication with that users)

    I want to do that with Java code. I tried to connect by using jdbc driver, but I couldn't. How can I connect to MSSQL server remotely, with windows user which have right to connect MSSQL 2008 R2.

    Thank you....

  2. #2
    Join Date
    Jan 2009
    Location
    United Kingdom
    Posts
    77
    Try :

    jdbc:sqlserver://myServer;integratedSecurity=true;

  3. #3
    Join Date
    Apr 2012
    Posts
    2
    Hi Jack,

    Thanks to reply. But I want to login to the server remotely, not to my computer. My Pc and the servers are in the different domain. So, it is a problem during connection.
    MyPC - x domain_____________________ServerA - y domain(I have login info user1)
    java program --------Connect------->> MSSQL server(user1 can connect via windows authentication on this server)

    By using "integratedSecurity=true"; I can only connect my own local MsSQL Server. I can't connect to remote server by using windows authentication.

  4. #4
    Join Date
    Jan 2009
    Location
    United Kingdom
    Posts
    77
    Just to clarify : with something like:
    jdbc:sqlserver://a_remote_ip_address;databaseName=AdventureWorks;in tegratedSecurity=true;

    the connection fails?

    When you say "in a different domain" , do you mean local domains or an AD authenticated domain?

Tags for this Thread

Posting Permissions

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