Hi Mahesh/Mike/Prasad
Thanks for your responses and sorry for not responding quickly.
I am not using windows authentication. I am using user/pass. It connected without any issues from Oracle SQL Developer as well as MS SQL Server Management Studio.
The issue seems to be with the sqljdbc driver we are using.
I tried connecting to the database using the below java code with the existing sqljdbc driver that we have in our integration server lib.
import java.sql.;
import com.microsoft.sqlserver.jdbc.;
public class ConnectDS {
public static void main(String[] args) {
// Declare the JDBC objects.
Connection con = null;
CallableStatement cstmt = null;
ResultSet rs = null;
try {
// Establish the connection.
SQLServerDataSource ds = new SQLServerDataSource();
ds.setURL("jdbc:sqlserver://hostname;" + "databaseName=MWSDB;integratedSecurity=false");
ds.setUser("myuser");
ds.setPassword("mypass");
javax.sql.DataSource ds1 = ds;
con = ds1.getConnection();
}
// Handle any errors that may have occurred.
catch (Exception e) {
e.printStackTrace();
} finally {
if (rs != null)
try {
rs.close();
} catch (Exception e) {
}
if (cstmt != null)
try {
cstmt.close();
} catch (Exception e) {
}
if (con != null)
try {
con.close();
} catch (Exception e) {
}
System.exit(1);
}
}
}
It gave the same error that I got when tried to enable Adapter connection.
Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.
Downloaded Microsoft JDBC Driver 4.2 (jre8) for SQL Server from Download - JDBC Driver for SQL Server | Microsoft Learn
With this jar, I am able to connect to the database using the above java code. I tried with all the versions of jars from the above link. All of them worked without any issues using the above java code.
This shows that the issue is potentially with the old jar that I have.
I replaced the old jar with the new one (which worked with the java code one ofter the other) in D:\SoftwareAG\IntegrationServer\lib\jars and restarted the IS.
The IS never started successfully. Please check the attached server logs. The server is creating huge crash dumps like hs_err_pid28820.mdmp in D:\SoftwareAG\IntegrationServer\instances\default. I cant attach them here.
Started IS at 2019-09-01 06:36:48 CDT.
I was never able to open IS admin page. I had to go to Windows services and stop the SAG IS windows service at 2019-09-01 06:45:42 CDT
Please see the attached Server log for details.
Note: Our integration server core database is also a Microsoft SQL server to which the IS is able to connect with the old jar (sqljdbc4.jar).
I am not sure if the new driver is causing any issue for the IS to connect to core DB. I am able to connect to our code db using your java code with the new driver as well as the old driver.
Please check the logs between 2019-09-01 06:36:48 CDT. and 2019-09-01 06:45:42 CDT if they are indicating something.
Please shed some light.
Regards,
Ravi
hs_err_pid.zip (134 KB)
Server and FailedAudit Log.zip (2.21 MB)