DX Application Performance Management

Expand all | Collapse all

APM DB upgrade from 9.0.0.0 to 10.1.0.15

Jump to Best Answer
  • 1.  APM DB upgrade from 9.0.0.0 to 10.1.0.15

    Posted 02-09-2016 11:10 AM

    Hi all,

     

    I have a customer who wants to upgrade an old 9.0.0.0 APM database to the latest release 10.1.0.15.

    Unfortunately he is having many issues there, because during the upgrade of EM and postgres (8.3.12 to 9.2.9), plenty of errors showed up in the em.log and other logs.

     

    Then he I tried several scenarios in a test environment, no one leading to a success.

    *** Scenario 1:
    1. db install of 10.1.0.15 with EM installer
    2. restore backup to Postgres
    Tables and more got already created so I cannot restore the old versioned db without errors.

    *** Scenario 2:

    1. Create backup (logged in as DB superuser wily):
      ~> pg_dump -h $DBHOST -p $DBPORT apmdb > apmdb.sql
    2. DB install of 10.1.0.15 with EM installer

    3. Rename the superuser 'postgres' to 'wily'
    4. Drop DB apmdb
      postgres=# DROP DATABASE apmdb;
    5. Create and empty DB apmdb with owner apmdbadm.
      postgres=# CREATE DATABASE apmdb OWNER apmdbadm;

    6. setup db user as it was with old installation
    7. Restore database from old versioned DB
      ~> psql -h $DBPHOST -p $DBPORT apmdb < apmdb.sql

    8. upgrade EM

    At this point, EM is 10.1.0.15, DB is new with restored data BUT is missing appmap tables and possibly more which is required by new version of DB
    9. Upgrade database schema or create new database schema
    This part ends with "apmdb already exists and is not a valid database."

     

    We are considering to discard the old database and start with a new one from scratch, because they are not using CEM.

    But my only question is, can the Team Center draw any data from a historical APM database at all?

    Does customer benefit from restoring an older DB assuming they are not using CEM?

     

    Thanks and regards,

    Mikel.



  • 2.  Re: APM DB upgrade from 9.0.0.0 to 10.1.0.15

    Posted 02-09-2016 11:17 AM

    Hi Mikel:

    You may want to ask this in APM EF or Yammer APM Group as well

     

    Thanks

    Hal German



  • 3.  Re: APM DB upgrade from 9.0.0.0 to 10.1.0.15
    Best Answer

    Posted 02-09-2016 02:29 PM

    Hi Mikel,

    Scenario 1 is the one you should be using with the APM DB backup from 9.0

    I would suggest to use the dbrestore-postgres.bat script from the 10.1 EM install to restore the backup.

    That script should drop the existing database before restoring the backup & finally upgrading the schema with a call to dbupgrade (dbupgrade.bat/sh)

    The schematools.log would contain any logged errors.

    Correction - the output from dbrestore-postgres.bat(sh) does not go to schematools.log and you need to redirect the standard out & error top capture it e.g.

    "... > dbrestore.out 2>&1"

     

    I would avoid scenario 2 as you should not be having to rename 'postgres' superuser to 'wily' etc.

     

    If not using CEM I believe it is only really appmap data the customer would lose so if they don't use it they could start afresh.

     

    Hope this helps

     

    Regards,

     

    Lynn



  • 4.  Re: APM DB upgrade from 9.0.0.0 to 10.1.0.15

    Posted 02-11-2016 05:13 AM

    Hello Mikel!

     

    I faced the same scenario 2 when helping a customer and raised a KB for that, please use below document and see if it helps:

     

    If you are upgrading to 10.0:

    Appmap tables are missing in the CEMDB Postgres database for APM 10.0.

     

    If you are upgrading to 10.1:

    http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec1443922.aspx?intcmp=searchresul…

     

    Gustavo.