Error on Install: Incorrect syntax near 'MERGE'. You may need to set the compatibility level of the current database to a higher value to enable this feature.

Document ID : KB000031382
Last Modified Date : 14/02/2018
Show Technical Document Details

The minimum supported version of SQL Server is SQL Server 2005. If you upgrade from a version before 2005 by attaching the database, update the Compatibility Level manually after the upgrade.


Execute the following command on the SQL Server 2008 database:

ALTER DATABASE mdb SET COMPATIBILITY_LEVEL = appropriate_compatibility_level


For information about this command, refer to the Microsoft Developer Network (MSDN) using the following steps.

Access the MSDN site at the following URL:

Search for the following article number:


Select the Database Compatibility Level Option article with the following version (for SQL Server 2008):



Note: You can also upgrade from a lower version of SQL Server to SQL Server 2008 by backing up the lower version database and then restoring it on SQL Server 2008. With this method, there is no issue with the Compatibility Level.