LocalDB from the express 2019 install doesn't seem to support compatibility level 140.

SimplyConphuzed 21 Reputation points
2021-06-16T14:00:14.157+00:00

Is there any way to get a version of LocalDB that supports compatibility level 140? We use LocalDB in some unit tests, but since requiring compatibility level 140, they don't work:

Valid values of the database compatibility level are 100, 110, 120, or 130.

Any thoughts?

SQL Server | Other
{count} votes

Accepted answer
  1. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-06-17T06:27:15.827+00:00

    Hi @SimplyConphuzed ,

    > Select @@version on a localdb database installed from the 2019 installer yields:
    >Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)

    You made a confuse about your environment. You have a SQL 2016 (130) environment, not SQL 2019 (150) environment. Your local DB is installed from SQL server 2016 installation package not SQL 2019.

    SQL 2016(130) could not compatibility SQL 2017 (140)

    106398-screenshot-2021-06-17-142506.jpg

    Please download SQL server 2019 Express setup file from this MS link. Then install SQL server 2019 version Local DB.


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Erland Sommarskog 121.9K Reputation points MVP Volunteer Moderator
    2021-06-16T21:42:44.72+00:00

    You have SQL 2016, so it does not obviously store compatibility level 140 which corresponds to SQL 2017.

    You need to install LocalDB for SQL 2017 or SQL 2019.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.