How to fix SiteProtector DB / MS-SQL driver/version problem – ArcSight Connector

After some time debugging this issue, I found one easy workaround for solving version compatibility problems (driver error from agent.log) when trying to collect logs from Microsoft SQL server, especially for environments where multiple versions are deployed.

Usually, at least one of the following errors indicate such problem:

Unable to detect database version
No suitable driver found for jdbc:sqlserver

Here are simple steps for achieving the task:

Download latest version for JTDS, a free implementation of the JDBC driver from the project website.
Change the driver value within connector configuration file as follows:

#agents[0].JDBCDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver
agents[0].JDBCDriver=net.sourceforge.jtds.jdbc.Driver
Also, change the connection string:
#agents[0].url=jdbc\:sqlserver\://<server>\:1433;DatabaseName\=realsecuredb
agents[0].url=jdbc\:jtds\:sqlserver\://<server>\:1433/realsecuredb
Go to driver/lib subdirectory and symlink standard driver files to the new one:
cd /opt/arcsight/connectors/<connector-name>/current/user/agent/lib
ln -s jtds-1.2.5.jar sqljdbc4.jar
ln -s jtds-1.2.5.jar sqljdbc.jar

Contribute to Open Source community by coding or donating to any project and keep sharing knowledge flag enabled, as usual. :-)

Consider joining https://protect724.arcsight.com if you are not yet a member, there you can find more discussions on ArcSight related topics.