Symptom
When trying to create a new MS SQL Server version 2012 connection the below error occurs:
- "The database driver is misconfigured. Contact your SAP Analytics Cloud agent administrator."
Environment
- SAP Analytics Cloud (Enterprise).
- Microsoft SQL Server 2012 Database.
Reproducing the Issue
- Login to SAC.
- Go to Connections, and then click on the "+" icon.
- Choose SQL Databases.
- Select a location, and then MS SQL Server 2012.
- Fill the necessary details and click OK
>> Notice the error: "The database driver is misconfigured. Contact your SAP Analytics Cloud agent administrator."
Cause
Cloud Agent is using the connection server to connect to the SQL Server databases, in the folder <tomcat installation folder>\tomcat\webapps\C4A_AGENT\WEB-INF\lib\standalone\ConnectionServer\jdbc, there is an .sbo file "sqlsrv.sbo".
Below is part of the file content, some old database versions are defined in the <Aliases> section, in this scenario, the parent database entry is needed to enable Cloud Agent to read the old versions in the nested alias part:
****************************************************
<DataBase Active="Yes" Name="MS SQL Server 2014">
<Aliases>
<!-- You can add an alias here if you are using some connections that are defined with an older database engine -->
<Alias>MS SQL Server 2012</Alias>
<Alias>MS SQL Server 2008</Alias>
<Alias>MS SQL Server 2005</Alias>
<Alias>MS SQL Server 2000</Alias>
<Alias>MS SQL Server 7.x</Alias>
<Alias>MS SQL Server 6.5</Alias>
</Aliases>
<JDBCDriver>
<!-- Uncomment and edit the following lines
to define java classes required by JDBC driver
<ClassPath>
<Path>your jar or class files directory</Path>
</ClassPath>
-->
<!-- Configuration is done for SQL Server 2012 JDBC Driver (2.0) -->
<Parameter Name="JDBC Class">com.microsoft.sqlserver.jdbc.SQLServerDriver</Parameter>
<Parameter Name="URL Format">jdbc:sqlserver://$DATASOURCE$;DatabaseName=$DATABASE$</Parameter>
</JDBCDriver>
<Parameter Name="Extensions">sqlsrv2014,sqlsrv2012,sqlsrv,jdbc</Parameter>
<Parameter Name="Force Execute">Always</Parameter>
<Parameter Name="Driver Capabilities">Query,Procedures,Cancel</Parameter>
</DataBase>
<DataBase Active="Yes" Name="MS SQL Server 2016">
<JDBCDriver>
<!-- Uncomment and edit the following lines
to define java classes required by JDBC driver
<ClassPath>
<Path>your jar or class files directory</Path>
</ClassPath>
-->
<Parameter Name="JDBC Class">com.microsoft.sqlserver.jdbc.SQLServerDriver</Parameter>
<Parameter Name="URL Format">jdbc:sqlserver://$DATASOURCE$;DatabaseName=$DATABASE$</Parameter>
</JDBCDriver>
<Parameter Name="Extensions">sqlsrv2016,sqlsrv,jdbc</Parameter>
<Parameter Name="Force Execute">Always</Parameter>
<Parameter Name="Driver Capabilities">Query,Procedures,Cancel</Parameter>
</DataBase>
<DataBase Active="Yes" Name="MS SQL Server 2017">
<JDBCDriver>
<!-- Uncomment and edit the following lines
to define java classes required by JDBC driver
&lt;ClassPath&gt;
&lt;Path&gt;your jar or class files directory&lt;/Path&gt;
&lt;/ClassPath&gt;
-->
<Parameter Name="JDBC Class">com.microsoft.sqlserver.jdbc.SQLServerDriver</Parameter>
<Parameter Name="URL Format">jdbc:sqlserver://$DATASOURCE$;DatabaseName=$DATABASE$</Parameter>
</JDBCDriver>
<Parameter Name="Extensions">sqlsrv2017,sqlsrv,jdbc</Parameter>
<Parameter Name="Force Execute">Always</Parameter>
<Parameter Name="Driver Capabilities">Query,Procedures,Cancel</Parameter>
</DataBase>
************************************************
Resolution
Apply the below steps:
- Edit the properties file, add below entries and save:
MS SQL Server 2014=<path_to_jdbc_driver>
MS SQL Server 2012=<path_to_jdbc_driver> - Choose "MS SQL Server 2012" when create the connection to SQL Databases.
See Also
- 2902697 - SAP Analytics Cloud agent - Frequently Asked Questions and Additional Information
- Refer to this link for more information about supported JDBC versions, under the section SQL version compatibility: https://learn.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix?source=recommendations&view=sql-server-ver16#sql-version-compatibility
Keywords
Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics, Issue, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SQL, version, agent, SAC Agent Kit , KBA , LOD-ANA-AQU , Import Data Connections (Acquiring Data) , Problem