Database errors post Upgrade from 10.5.2.15 to 10.7.0.45

Document ID : KB000108028
Last Modified Date : 26/07/2018
Show Technical Document Details
Issue:
After restoring and upgrading the cemdb to 10.7.0.45, I upgraded the EM to the same version and started it. However, the EM failed to start with the following error:

[ERROR] [main] [Apm.Data.Model] APM Database is not reachable. Please check the connectivity...
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select this_.id as id5_0_, this_.name as name5_0_, this_.creation_date as creation3_5_0_, this_.update_date as update4_5_0_, this_.user_name as user5_5_0_ from apm_vertex_type this_ where this_.name=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:635)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
     .
     .
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
     .
     .
    ... 73 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation "apm_vertex_type" does not exist
  Position: 161
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
     .
     .
    ... 81 more


 
Environment:
CA Application Performance Management 10.7.0.45
Cause:
Upon further troubleshooting, we found out that the cemdb was actually empty. The restore process did not complete properly.
Resolution:
Re-run the restore process with the 10.7 dbrestore-postgres.sh script, which restores and upgrade the schemas to 10.7 successfully.

 
Additional Information:
Restore the APM Database