# Installation and Upgrade Guide

# Upgrade

This chapter includes information on how to upgrade Analytics. It includes the following sections:

- Upgrade Paths
- Upgrading Analytics from Version 2.0 to Analytics 2.1

## Upgrade Paths

The following table summarizes the supported database upgrade paths for Analytics.

Table 5-1 Upgrade Paths
Upgrade Path | Upgrade References
--- | ---
2.0 to 2.1 | Follow the procedures in this chapter.
1.2 to 2.1 | Follow the procedures in this chapter.

Note: | We do not support upgrades from Analytics 1.0/1.1 to 2.1. To do so, you must first upgrade Analytics 1.0/1.1 to either 1.2 or 2.0, then perform the appropriate upgrade to Analytics 2.1.

This section discusses:

- Upgrading Analytics from Version 2.0 to Analytics 2.1
- Upgrading Analytics from Version 1.2 to Analytics 2.1

## Upgrading Analytics from Version 2.0 to Analytics 2.1

This section describes how to upgrade from Analytics 2.0 to Analytics 2.1.

To upgrade from Analytics 2.0 to Analytics 2.1:

1. Delete the Analytics folder beneath the install_dir\common\container\tomcat\5.0.28\work directory.
2. Back up the installation directory of the previously-installed version of Analytics Services, using the tool of your choice.
3. Install Analytics Services. For details, see Installing Analytics Services. If you are choosing the same location as the existing software, accept the default installation directory location when prompted.
4. Back up the Analytics database using the tool of your choice.
5. Upgrade the Analytics database from 2.0 to 2.1 by running the upgrade_2.0_to_2.1.sql script:

install_dir\ptanalytics\2.1\sql\database\upgrade_2.0_to_2.1.sql

6. Reconfigure Analytics by running the Analytics Configurator. For details, see Configuring Analytics
7. (AquaLogic Ensemble integration only) Run the following command from the command line on the Analytics host machine to create the Ensemble tables:

- PTANALYTICS_HOME\bin\AnalyticsLoadEvents.bat ..\settings\config\analytics-ensemble-event-def.xml (Windows)

- PTANALYTICS_HOME/bin/AnalyticsLoadEvents.sh ../settings/config/analytics-ensemble-event-def.xml (UNIX/Linux)

8. (Oracle only) Run your database's analyisis tool on both the Analytics and portal databases to increase the efficiency of the databases.
9. Back up the installation directory of the previously-installed version of the Interaction component, using the tool of your choice.
10. Install the Interaction component. For details, see Installing the Interaction Component
11. Install the Image Service component. For details, Installing the Image Service Component
12. Stop and restart the Analytics services. For details, see Starting Analytics and Portal Services.
13. Register the Analytics application, remote server, Web services, and portlets with the portal by importing the migration package. For details, see Registering Analytics with the Portal.
14. Register the Ensemble application with Analytics. For details, see Importing the Ensemble Migration Package.
15. Install the Automation Service component. For details, see Installing the Automation Service Component
16. Add Analytics jobs to the Automation Service. For details, see Adding Analytics Jobs to the Automation Service.

## Upgrading Analytics from Version 1.2 to Analytics 2.1

This section describes how to upgrade from Analytics 1.2 to Analytics 2.1.

Note: | You must upgrade your portal from Plumtree Foundation 5.x to AquaLogic Interaction 6.x before upgrading Analytics from 1.2 to 2.1.

To upgrade from Analytics 1.2 to Analytics 2.1:

1. Delete the Analytics folder beneath the install_dir\common\container\tomcat\5.0.28\work directory.
2. Back up the installation directory of the previously-installed version of Analytics Services, using the tool of your choice.
3. Install Analytics Services. For details, see Installing Analytics Services. If you are choosing the same location as the existing software, accept the default installation directory location when prompted.
4. From the Scheduled Tasks, delete the Sync job from the Analytics 1.2 installation.
5. Back up the Analytics database using the tool of your choice.
6. Upgrade the Analytics database from 1.2 to 2.0 by running the upgrade_1.x_to_2.0.sql script:

install_dir\ptanalytics\2.1\sql\database\upgrade_1.x_to_2.0.sql

7. Upgrade the Analytics database from 2.0 to 2.1 by running the upgrade_2.0_to_2.1.sql script:

install_dir\ptanalytics\2.1\sql\database\upgrade_2.0_to_2.1.sql

8. As the portal database user, query the portal database to check if these tables exist:

- PTROLES
- PTAPPLICATIONS
- PTCAPABILITIES
- PTUSERROLELINKS
- PTGROUPROLELINKS
- PTROLECAPABILITYLINKS
- PTCREDENTIALPROPERTIES
- PTCREDENTIALVALUES

If these tables exist, continue to the next step.

If these tables do not exist, run the create_sds_tables_database.sql script on the portal database to create these tables. The script is located in install_dir\ptanalytics\2.1\sql\database\

9. As the portal database user, run the install_sds_seeddata.sql setup script on the portal database. The script is located in install_dir\ptanalytics\2.1\sql\database\ .
10. Reconfigure Analytics by running the Analytics Configurator. For details, see Configuring Analytics
11. (AquaLogic Ensemble integration only): Run the following command from the command line:

- PTANALYTICS_HOME\bin\AnalyticsLoadEvents.bat ..\settings\config\analytics-ensemble-event-def.xml (Windows)
- PTANALYTICS_HOME/bin/AnalyticsLoadEvents.sh ../settings/config/analytics-ensemble-event-def.xml (UNIX/Linux):

12. Partition the Analytics database tables by running the following script:

- AnalyticsPartition.bat (Windows)
  install_dir\ptanalytics\2.1\bin\AnalyticsPartition.bat
- AnalyticsPartition.sh (UNIX/Linux)
  install_dir/ptanalytics/2.1/bin/AnalyticsPartition.sh

The partition.log file displays partitioning progress in real-time. This log is located in:

- C:\bea\alui\ptanalytics\2.1\logs (Windows)
- /opt/bea/alui/ptanalytics/2.1/logs (UNIX/Linux)

The following table describes the approximate lengths of time that it should take to partition the Analytics database:

Table 5-2 Analytics Database Partitioning Estimates - Analytics 1.2 to 2.1
Total Number of Facts | Time to Partition
--- | ---
10 million | 12.5 minutes
20 million | 25 minutes
50 million | 62.5 minutes
100 million | 2 hours 5 minutes
500 million | 10 hours 50 minutes

13. (Oracle only) Run your database's analyisis tool on both the Analytics and portal databases to increase the efficiency of the databases.
14. Back up the installation directory of the previously-installed version of the Interaction component, using the tool of your choice.
15. Install the Interaction component. For details, see Installing the Interaction Component
16. Install the Image Service component. For details, Installing the Image Service Component
17. Stop and restart the Analytics services. For details, see Starting Analytics and Portal Services.
18. Register the Analytics application, remote server, Web services, and portlets with the portal by importing the migration package. For details, see Registering Analytics with the Portal.
19. Register the Ensemble application with Analytics. For details, see Importing the Ensemble Migration Package.
20. Install the Automation Service component. For details, see Installing the Automation Service Component
21. Add Analytics jobs to the Automation Service. For details, see Adding Analytics Jobs to the Automation Service.

##