Why is Heroku Connect erroring on InvalidDatabaseException and DatabaseValidationFailed?

Issue

My connection is in DB_UNAVAILABLE and I see in my logs messages that look like:

database unavailable [InvalidDatabaseException]

or

DB is missing Connect metadata [DatabaseValidationFailed]

Why is this happening?

Resolution

Heroku Connect has 3 system tables in every schema that it relies on to operate properly:

  • _hcmeta
  • _trigger_log
  • _trigger_log_archive

These live in the schema next to your mapped objects. If these disappear, you will see the above errors. To verify these tables are missing you can run

\dt <schema>.*

To solve this, you should recreate your connection.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2018 Salesforce.com