Symptom
- When browsing source objects from a Microsoft SQL Server connection in a new Data Flow, the source metadata/object definition cannot be retrieved and source selection cannot complete.
- The connection validation succeeds, but object discovery/selection within Data Flow fails.
- Error displayed during metadata read: Get metadata request could not be performed due to an error returned by DS-Lite (MDS): "'concat' is not a recognized built-in function name. 'concat' is not a recognized built-in function name. Incorrect syntax near the keyword 'as'. Incorrect syntax near ','. Incorrect syntax near ','. Incorrect syntax near ','. The statements could not be prepared."
Environment
- SAP Datasphere
- Microsoft SQL Server
Reproducing the Issue
- Open Data Builder.
- Create a new Data Flow.
- In the object browser, open Sources.
- Select the Microsoft SQL Server connection.
- Navigate to a table or view and select it.
- Observe that metadata retrieval fails and the object cannot be imported into the Data Flow.
Cause
The SQL Server version must be SQL Server 2012 (compatibility level 110) onwards. On older SQL Server versions or databases set to a compatibility level below 110, this produces the error even if the source object itself does not use CONCAT.
Resolution
Run these sql on the source database:
SELECT @@VERSION;
SELECT name, compatibility_level
FROM sys.databases
WHERE name = '<your_database_name>';
If the version is below 2012, the database needs to be upgraded. If it's 2012+ but compatibility_level is below 110, raising it to 110 will fix it.
See Also
Keywords
Datasphere, Data Flow, metadata retrieval, SQL Server, MSSQL, concat not recognized, built-in function name, compatibility level 110, SQL Server 2012, object discovery, source browsing, get metadata request, incorrect syntax near 'as', data integration, MDS , KBA , DS-DI-DF , Data Flow Runtime , Problem
SAP Knowledge Base Article - Public