Menu

Wednesday 20 September 2023

How to make datasource test-connection to MSSQL DB Instance.

 Required Tool and Software: 

  • OpenJDK / Oracle JAVA 
  • dbconnect.jar
  • mssql-jdbc-12.2.0.jre8.jar



Download link for dbconnect.jar and mssql.jar 

https://drive.google.com/drive/folders/1H0UI62dmVnAQmKmPSRMrztmzrq1y49to?usp=drive_link




TEST Connection for MSSQL, with SSL and NON_SSL :

Command: With SSL and Protocol TLS1.2:  

/opt/java_1.8_64/bin/java -cp /tmp/dbConnect.jar:/tmp/mssql-jdbc-12.2.0.jre8.jar com.sid.dbConnect "jdbc:sqlserver://123.456.123.789:44332;databaseName=MSSQLDB;encrypt=true;trustServerCertificate=false;sslProtocol=TLSv1.2;" "$USERNAME" ‘$PASSWORD’  com.microsoft.sqlserver.jdbc.SQLServerXADataSource


Command: Without SSL:

/opt/java_1.8_64/bin/java -cp /tmp/dbConnect.jar:/tmp/mssql-jdbc-12.2.0.jre8.jar com.sid.dbConnect "jdbc:sqlserver://123.456.123.789:44332;databaseName=MSSQLDB" "$USERNAME" ‘$PASSWORD'  com.microsoft.sqlserver.jdbc.SQLServerXADataSource




Add below parameter on JVM arguments if you were facing SSL_protcol_Handshake issue on WebSphere Application server / WebSphere liberty.

-Dcom.ibm.jsse2.overrideDefaultTLS=true



Thanks :-)


No comments:

Post a Comment