Hi,
Did anyone has used jTDS or any JDBC driver to connect to Microsoft SQL SERVER on IPV6 environment?
if yes can anyone please provide me code or any help?

i tried with microsoft one which they claim support for ipv6 but i didnt go thru even there. may be i am too new for ipv6.
please help!
Thanks, Ajay

but i didnt go thru even there.

Can you please tell us something more on that, Especially with the code which you used while trying to connect to your database.

OK all information are below.

[1] Client side:

1. Which OS platform are you running on? -- Windows Server 2003 SP2
2.
Which JVM are you running on? Java 1.5.8
3.
What is the connection URL in you app? "jdbc:sqlserver://;serverName=fe80::21a:4bff:fecf:dfe5%4;username=Administrator;password=Ajay;" [Default instance MSSQLSERVER and Deafult port 1433]
4. If client fails to connect, what is the client error messages? [com.microsoft.sqlserver.jdbc.SQLServerException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication] (BUT IF I GIVE IPV4 IP same thing works)
5. Is the client remote or local to the SQL server machine? [Remote and Local for both i am getting same error]
6. Is your client computer in the same domain as the Server computer? (Same domain )

[2] Server side:

1. What is the MS SQL version? [SQL Sever 2005(express) and SQL SERVER 2008]
2. Does the server start successfully? [YES ]
3. If SQL Server is a named instance, is the SQL browser enabled? [ NO] DEFAULT MSSQLSERVER but yeah BROWSER service also enabled
4. What is the account that the SQL Server is running under?[Network Service]
5. Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider? [ not applicable]Firewall is diabled
6. Do you make firewall exception for SQL Browser UDP port 1434? In SQL2000, you still need to make firewall exception for UDP port 1434 in order to support named instance.[ not applicable ] no firewall

I am just connecting and executing/or checking "select * from table"
i am just using same java code (which i can see everywhere on net) that connects DB and give info.
If any body can provide me more infor related to IPV6 will be much helpfull as MSDN or Help doc just gives 2 lines on it. as below

To use the serverName property

jdbc:sqlserver://;serverName=3ffe:8311:eeee:f70f:0:5eae:10.203.31.9\\instance1;integratedSecurity=true;

To use the properties collection

Properties pro = new Properties();

pro.setProperty("serverName", "serverName=3ffe:8311:eeee:f70f:0:5eae:10.203.31.9\\instance1");

Connection con = DriverManager.getConnection("jdbc:sqlserver://;integratedSecurity=true;", pro);

My code is somelike like below very basic.

import java.sql.*; 
 
public class ConnectDB { 
 
   public static void main(String[] args) { 
 
      // Create a variable for the connection string. 
//    String connectionUrl = "jdbc:sqlserver://;serverName=fe80::21a:4bff:fecf:dfe5%4;integratedSecurity=true;"; 
//        String connectionUrl = "jdbc:sqlserver://;serverName=fe80::21a:4bff:fecf:dfe5%4;username=Administrator;password=password;"; 
      // Declare the JDBC objects. 
      Connection con = null; 
      Statement stmt = null; 
      ResultSet rs = null; 
 
      Driver driver     = null; 
 
      try { 
         // Establish the connection. 
         driver = (java.sql.Driver)Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); 
         DriverManager.registerDriver(driver); 
         con = DriverManager.getConnection(connectionUrl); 
 
         // Create and execute an SQL statement that returns some data. 
         String SQL = "select * from systypes"; 
         stmt = con.createStatement(); 
         rs = stmt.executeQuery(SQL); 
 
         // Iterate through the data in the result set and display it. 
         while (rs.next()) { 
            System.out.println(rs.getString(4) + " " + rs.getString(6)); 
         } 
      } 
 
      // Handle any errors that may have occurred. 
      catch (Exception e) { 
         e.printStackTrace(); 
      } 
      finally { 
         if (rs != null) try { rs.close(); } catch(Exception e) {} 
         if (stmt != null) try { stmt.close(); } catch(Exception e) {} 
         if (con != null) try { con.close(); } catch(Exception e) {} 
      } 
   } 
}

Please if you have code/implemetation of connecting to IPV6 DB much appriciate.

Thanks, Ajay

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.