The OPENJSON function is available only under compatibility level 130. If your database compatibility level is lower than 130, SQL Server can’t find and run the OPENJSON function. Other built-in JSON functions are available at all compatibility levels.
You can check compatibility level in the
sys.databases view or in database properties.
You can change the compatibility level of a database by using the following command:
ALTER DATABASE <DatabaseName> SET COMPATIBILITY_LEVEL = 130