liquibase.exception.DatabaseException: Incorrect syntax near 'TRANSACTION'

Reason: liquibase.exception.DatabaseException: Incorrect syntax near ‘TRANSACTION’. [Failed SQL: (102) BEGIN TRY BEGIN TRANSACTION]
We are getting above error while executing MSSQL file via liquibase changeset
databaseChangeLog:

  • changeSet:
    id: sample
    author: name
    runOnChange: true
    changes:
    - sqlFile:
    dbms: ‘mssql’
    splitStatements: false
    path: DEMO.sql
    relativeToChangelogFile: true
    We also tried adding splitStatements: false in changeset. But nothing worked. Kindly help on how to execute storeprocedure of MSSQL server.

Please provide the contents of the DEMO.sql file. Typically you need to define “endDelimiter” when creating stored procedures using Liquibase, since the default semicolon will not usually work.