SQLServerReservedKeywords

This check disallows SQL Server reserved keywords from being used in database object names. See Reserved Keywords (Transact-SQL) for complete list of keywords.

  • Checks require specific parameters noted in the table.
  • Customizations to the list are available to the user, and are stored in the liquibase.checks-settings file.

Uses

Use the check to ensure that no SQL Server reserved words are used to name database objects. SQL Server has reserved certain words for internal purposes, and using these words can cause unexpected consequences when deploying database schema changes or data. These name conflicts can result in job failures from multiple tools in your tool DevOps chain. There still may be instances where you are certain you need to use reserved keywords, and understand the implications. To enable this, the quality check can be customized with an Allowed List. This quality check, like other checks, can be configured with a severity level which returns an exit code designed to stop automated jobs, giving your team time to make sure database objects.

Run the SQLServerReservedKeywords check

To run the SQLServerReservedKeywords check, ensure you have a Liquibase Pro license key and the checks-scope property includes changelog. The checks-scope parameter is set in the default properties file, environment variable, or any standard method. Then, check the changelog to see if SQLServerReservedKeywords is enabled.

Note: Please be aware that OracleReservedKeywords only supports modeled changeset types. If you use this Quality Check with unmodeled changesets (formatted SQL changelogs as well as sql and sqlFile changeTypes), a message will appear stating the changeset was skipped.

Enable the SQLServerReservedKeywords check by running the following command in the CLI:

liquibase checks enable --check-name=SQLServerReservedKeywords
Short Name Scope Enabled Severity Customization Description
SQLServerReservedKeywords changelog

false

Default value: 1

  • 'INFO' | 0
  • 'MINOR' | 1
  • 'MAJOR' | 2
  • 'CRITICAL' | 3
  • 'BLOCKER' | 4

OBJECT_TYPES = null

ALLOWED_LIST = null

CASE_SENSITIVE = true

This check disallows SQL Server reserved keywords from being used in database object names. See https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-ver16 for complete list of keywords.