0

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

Midhun Agnihotram
  • 165
  • 1
  • 3
  • 15
  • This is an interesting situation. Were you able to get it sorted? Can you post what you did to resolve it? TY – tabbyfoo Jun 15 '22 at 16:56
  • I was thinking more about this and trying to research it. I came across this article about resolving this error and it might help - but since you're getting the error when you run Liquibase specifically, I'm not 100% sure it'll be a complete fix: https://stackoverflow.com/questions/1362531/sql-server-invalid-object-name-but-tables-are-listed-in-ssms-tables-list – tabbyfoo Jun 20 '22 at 15:25

0 Answers0