Thursday, November 7, 2013

Quality Center upgrade to v11

I have done an upgrade recently which was from QC 9.2 to ALM11. I am trying to document the steps followed and challenges faced during the upgrade.

Prerequisites for upgrade
  1. QC 9.2 repository should be over file system. 
  2. Note: QC 9.2 repository can be over database or over file system. If it is over database then move those project repositories to over file system as ALM 11 does not support repository over database.
  3. Take a backup of the existing project repository from QC 9.2 server.
  4. Copy the repository backup to the destination server where you are going to install ALM 11.
  5. Take a copy of existing site admin schema and project schema’s from the database server
  6. Restore this backup to the database server which is being used as a DB server for ALM11.
  7. Please note that keep the copy of DB schemas and repository in case of failed upgrade and project gets corrupted. This helps to restore the project again for upgrade.
  8. Make sure entire oracle database is backed up.
  9. Please make sure that all the owners of the project are informed.
  10. HP Service Agreement ID – for downloads, support requests and knowledge documents.
  11. License key for QC 11 installation.
  12. Installation files for ALM 11.

Upgrade Strategy





  •        Backup: Backup of project repository and database schema for site admin and projects.

  •        Install: Installation of QC 11 and upgrading the site admin schema during installation so that all the users  and projects are upgraded with that.

  •        Upgrade and Test: Step by step upgrading the project using the upgrade tool provided by QC 11.

  •        Restore: In case of failed upgrade, restoration of the project using the backup of the project in database and project repository over file system.
Detailed Upgrade Steps
    1. Check if all the project repositories are over file system, if not move those to over file system.
    2. Do a fresh installation of Oracle on the server machine
    3. Take backup of repository from QC 9.2 server
    4. Take backup of database and project schemas
    5. Copy the project repository to the server machine
    6. Create a copy of the site admin schema and project schema in the new database server installed for ALM 11
    7. Start installation of ALM 11 using the existing site admin schema
    8. Upgrade the projects once installation is done by following below steps:
      1. Verify
      2. Repair
      3. Upgrade
    9. Test upgraded production environment
      1. Alert the project stakeholders about the completeness of the project upgrade.
      2. Verify that you can connect to the projects in Site Administration.
      3. Ask project users to check that they can log in to all ALM projects using their account.
      4. Alert project stakeholders to perform the sanity tests.
      5. Ask the users to perform their routine operations and report feedback such as response time or the occurrence of errors.
      6. Ask the users to check new features and functionalities within ALM and provide feedback.
      7. Check the users' group permissions that may be set by default for new features, and modify them if necessary.
      8. Perform a load test on the testing environment to verify that it can handle the intended number of users.
      9. If you are using HP integration or a third-party tool with ALM, validate backward compatibility of the integration.


    Project upgrade to ALM 11



    • Remove the project from the list as this has come as part of site admin schema upgrade and points to the old repository path and database.
    • For “dbid.xml” reference, create an empty project in the fresh ALM installation. Now this dbid.xml file can be used to restore different projects. Location of this file can be anywhere in the system (ex desktop) as while upgrade the actual dbid.xml file of project would be upgraded by the upgrade tool.
    • Update “dbid.xml” file following fields

               <?xml version="1.0" encoding="UTF-8"?>
               <ProjectDescription>
                    <PROJECT_NAME>Project Name</PROJECT_NAME>
                    <DB_TYPE>3</DB_TYPE>
                    <DESCRIPTION>Created on 2013-06-24 20:00:11</DESCRIPTION>
                    <DB_CONNSTR_FORMAT>DB Connection String (will be taken from sample project db file)</DB_CONNSTR_FORMAT>
                    <DB_NATIVE_AUTHENTICATION>N</DB_NATIVE_AUTHENTICATION>
                    <DB_NAME>Name of restored DB schema for the project</DB_NAME>
                    <DBSERVER_NAME>Name of ALM 11 DB server</DBSERVER_NAME>
                    <DB_USER_PASS>Copy password from sample project </DB_USER_PASS>
                    <PR_HAS_VCSDB>N</PR_HAS_VCSDB>
                    <PHYSICAL_DIRECTORY>Location of the project repository in the file system</PHYSICAL_DIRECTORY>
                    <USERS_QUOTA>-1</USERS_QUOTA>
                    <PR_IS_ACTIVE>Y</PR_IS_ACTIVE>
                    <SAQ_IS_ACTIVE>N</SAQ_IS_ACTIVE>
                    <VM_REPOSITORY></VM_REPOSITORY>
                    <PR_LANGUAGE>English</PR_LANGUAGE>
                    <PROJECT_TYPE>Standard</PROJECT_TYPE>
                    <IS_TEMPLATE>N</IS_TEMPLATE>
                    <PROJECT_UID>Take this from sample project dbid and change some letters</PROJECT_UID>
                    <PR_SMART_REPOSITORY_ENABLED>Make this parameter as ‘N’</PR_SMART_REPOSITORY_ENABLED>
                    <PR_IS_QPM_AUTO_CALC_ENABLED>Y</PR_IS_QPM_AUTO_CALC_ENABLED>
              </ProjectDescription>

    • After updating dbid.xml file, we need to restore the project using this dbid file. For this we have two option:
      •  To go to the domain you want to restore the project into, right click and select “Restore Project” option
      •  Or on the right hand pane on the select restore project option
    • Select the updated bdid.xml file to restore the project.
    • Click on restore button.
    • Deactivate the project to perform further upgrade activities.
    • In the right hand pane check if DB path and repository path are correct.
    • Select “Verify Project” option and start verification of the project
      • Logs are stored at: \sa\DomsInfo\MaintenanceData\out\\\
    • Repair the project by selecting the “Repair Project” option
    • Upgrade the project by selecting “Upgrade Project” option
    • Active the project using “Activate Project” option
    • Test the project by logging into ALM and check the project if it is accessible.

    Upgrade Issues and Workarounds

    Issue 1: APM_2.0, BPTA_2.00 and SPI_2.0 were not available while upgrade.

    Resolution: The folders were taken from QC9.2 installation folder and placed at the ALM11 server. This helped to solve the issue. These extension files contain additional fields which need to be created as part of enabling these extensions in ALM.


    Issue 2: Upgrade extension files were missing from APM_2.0_to_2.6 and SPI_2.0_to_2.6

    Resolution: There were other upgrade extension files were available in the folder for other version upgrades ex. 2.1 to 2.6, 2.5 to 2.6 etc. This is an xml file which calls a java file which is invoked for version upgrade and this is the same file called for all the different enterprise extension versions which needs to be upgraded. To fix this issue we copied an existing xml file and renamed it to “upgrade_APM_2.0_to_2.6” and “upgrade_SPI_2.0_to_2.6” respectively.


    Issue 3: While upgrade we got the error unable to load the file, fields mentioned in the xml file are already available in the main database.

    Resolution: What we understood from this issue is that the given XML file is used to create additional fields in the database to enable the extension. If the fields were already available upgrade tool was throwing the error. To fix this issue we deleted the fields which were there in the database. Since it is the file referring to BPTA extension and BPT module is integrated with ALM11 as a default module, all the fields were available in the database. So we deleted all the fields from the xml file.


    Issue 4: Post upgrade while clicking on Test script tab for the existing script ALM was throwing the error:
    When we right click on the component it shows “go to flow instead of “Go to component”. So components are being shown as a flow after upgrade.

    Resolution: We created on sample scenario and when we are clicking on the newly created component it is showing that as go to component and this functionality is working fine.
    When we compared closely the their corrosponding rown in the database we found out that value of “CO_BPTA_FLOW_TEST_ID” was set to 0 which means that it is pointing to a flow with ID=0. But in reality it was a business component and hence this field should be NULL. As a resolution we changed the value to this field to null and this solved the issue. Since we upgraded from QC 9.2 and there are no flows used in that version there was not possibility of anything malfunctioning by this change.
    Query used: UPDATE COMPONENT set CO_BPTA_FLOW_TEST_ID=''

    Lessons Learnt

    1. Setup files for installation should be downloaded beforehand
    2. Availability of licenses should be confirmed
    3. Availability of HP-SAID should be there to ensure access to HP support documentation and patches
    4. Should keep backup in case of project gets corrupted and needs to be restored for upgrade
    Above write-up is written based on my experience with the upgrade. It would be great if you can add your experiences to this :-))

    References:
    1. ALM 11 Admin guide
    2. ALM 11 upgrade best practices
    3. Various blog posts
    4. Discussion with learned colleagues