We use Liquibase for our DB management. I am trying to use the non-2005 script from https://blog.devart.com/find-invalid-objects-in-your-databases.html page to find invalid objects in our database.
The whole T-SQL works fine in SSMS but fails when run through liquibase. Error:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name '#objects'.
My Changelog has definition as:
<changeSet id="Repetitive" author="XXXXXX" runAlways="true">
<sqlFile splitStatements="false"
path="scripts/repetitive/check_invalid_objects.sql"/>
</changeSet>
I have even tried with various combinations of usage of GO
and its placement in the script but it fails for something or the other.
Any help here would be greatly appreciated!
Thanks, Midhun