# Installation and Upgrade Guide

# Quickstart Overview

This chapter provides brief, high level instructions for the installation and upgrade of Analytics, and is intended to quickly guide experienced administrators through the installation or upgrade procedure.

This chapter is divided into two major sections:

- Installation. This section covers installing and configuring the Analytics components, scripting the database, and starting and verifying the installation. The organization of this section maps directly to detailed instructions in Chapter 4, "Installation".
- Upgrade. This section covers upgrading version of Analytics to the latest version. The organization of this section maps directly to detailed instructions in Chapter 5, "Upgrade".

## Installation

Before you install Analytics, ensure that you have completed pre-installation steps. For details, see Installation Prerequisites

### Installing Analytics Services

For more complete details on performing this task, see Installing Analytics Services.

To install Analytics Services:

1. Log in to the remote server host computer as the local administrator (on Windows) or a user with directory write privileges (on UNIX or Linux).
2. Copy the installer to the disk location from where you plan to launch it.
3. Launch the Analytics Installer.

- Windows: ALAnalytics_ALI_v2-1.exe
- UNIX/Linux: ALAnalytics_ALI_v2-1

4. Choose to install the Analytics Services component.
5. After the installer has copied all files to the installation directory, click Done. The Analytics Configurator will launch; however, do not complete the configuration at this time.

### Configuring the Analytics Database

Perform one of the following procedures that is appropriate to your database platform:

- Creating and Setting Up the Analytics Database on Microsoft SQL Server 2000
- Creating and Setting Up the Analytics Database on Microsoft SQL Server 2005
- Creating and Setting Up an Oracle Database

#### Creating and Setting Up the Analytics Database on Microsoft SQL Server 2000

For more complete details on performing this task, see Creating and Setting Up the Analytics Database on Microsoft SQL Server 2000.

To set up the Analytics database on Microsoft SQL Server 2000:

1. Copy the scripts from install_dir\ptanalytics\2.1\sql\mssql to the database host computer.
2. Create the Analytics database user:

1. Create the Analytics database user with the user name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
2. Configure the Analytics database user to use SQL Server Authentication.
3. Set the Analytics database user password to the password you designated when you completed the Analytics Installation and Configuration Worksheets document.

3. Create the Analytics database with the following properties:

- Create a database with the name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
- Configure the size of the database.

4. Grant the Analytics database user the public and db_owner roles for the Analytics database.
5. On the Analytics database Properties | Permissions tab, grant the Analytics database user all permissions to the Analytics database.
6. Connect to the Analytics database as the Analytics database user, using SQL Server Authentication.
7. Run the setup scripts for the database, located in the install_dir\ptanalytics\2.1\sql\mssql\ folder, in the following order (make sure that you are running the scripts on the Analytics database):

1. db_creation.sql
2. install_seeddata.sql

8. Connect to the portal database as the portal database user.
9. 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_mssql.sql script on the portal database to create these tables. The script is located in install_dir\ptanalytics\2.1\sql\mssql\

10. 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\mssql\ .

#### Creating and Setting Up the Analytics Database on Microsoft SQL Server 2005

For more complete details on performing this task, see Creating and Setting Up the Analytics Database on Microsoft SQL Server 2005.

To set up the Analytics database on Microsoft SQL Server 2005:

1. Copy the scripts from install_dir\ptanalytics\2.1\sql\mssql to the database host computer.
2. Create the Analytics database user:

1. Create the Analytics database user with the user name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
2. Configure the Analytics database user to use SQL Server Authentication.
3. Set the Analytics database user password to the password you designated when you completed the Analytics Installation and Configuration Worksheets document.

3. Create the Analytics database with the following properties:

- Create a database with the name you provisioned when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
- Configure the size of the database.
- Change the default database for the Analytics database user to the Analytics database.

4. Grant the Analytics database user the db_owner role for the Analytics database.
5. Create the Analytics database schema. Specify the Analytics database user as the schema owner.
6. Grant the Analytics database user the sysadmin server role.
7. Connect to the Analytics database as the Analytics database user, using SQL Server Authentication.
8. Run the setup scripts for the database, located in the install_dir\ptanalytics\2.1\sql\mssql\ folder, in the following order (make sure that you are running the scripts on the Analytics database):

1. db_creation.sql
2. install_seeddata.sql

9. Connect to the portal database as the portal database user.
10. 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_mssql.sql script on the portal database to create these tables. The script is located in install_dir\ptanalytics\2.1\sql\mssql\

11. 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\mssql\ .

#### Creating and Setting Up an Oracle Database

For more complete details on performing this task, see Creating and Setting Up the Analytics Database on Oracle.

To create and set up an Oracle database:

1. Copy the oracle directory from install_dir\ptanalytics\2.1\sql to the Analytics database's host computer.
2. Log on to the host computer for the Analytics database as owner of the Oracle system files.
3. Run the following scripts against your Oracle database as sysdba:

1. Determine the name of the SID that you will be using for this installation. If you changed the SID from the default when you installed the portal, you need to update create_analytics_tablespaces.sql to reflect the SID that you used, substituting all occurrences of the default SID name with your SID name. The default SID name is BEAS.

If you are creating a new SID, configure AL32UTF8 as the database character set and AL16UTF16 as the national character set.

2. Run the script create_analytics_tablespaces.sql.
3. Run the script create_analytics_user.sql. For details on editing the script to use anything other than the default user and password, see Creating and Setting Up the Analytics Database on Oracle.
4. Add the Oracle database user and password values into the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.

4. Execute the following steps as the analytics user, which you just created. The scripts that you run are located in the oracle directory that you copied in Step 1.

1. Run the script create_analytics_schema.sql.
2. Run the script install_analytics_seeddata.sql.

5. 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_oracle.sql script on the portal database to create these tables. The script is located in install_dir\ptanalytics\2.1\sql\oracle\

6. 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\oracle\ .
7. Run your database's analysis tool on the portal database to increase the efficiency of the database.

### Configuring Analytics

For more complete details on performing this task, see Configuring Analytics

To configure Analytics:

1. Ensure that the following services are running:

- BEA ALI API Service
- BEA AL Analytics Service

2. Launch the Analytics Configurator:

- In Windows, choose Start | Programs | BEA | Analytics Configurator.
- On UNIX or Linux, open http://localhost:11944/configurator/ui/start.jsf in a web browser.

3. Complete the configuration pages using the values you decided on when you completed the Analytics Configurator Worksheet, which is included in the Analytics Installation and Configuration Worksheets document.
4. An installer screen appears that summarizes your configuration. Review this screen and make changes, if necessary. Otherwise, click Update.

### Registering Ensemble Events

(AquaLogic Ensemble integration only) To register Ensemble events, run the following from the command line on the Analytics host machine:

- 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)

### Installing the Interaction Component

For more complete details on performing this task, see Installing the Interaction Component.

Install the Interaction component on all servers that host the portal. The installation instructions are the same for Windows, UNIX, and Linux hosts, with slight exceptions as noted.

Note: | You must reinstall the Interaction component after each time you upgrade AquaLogic Interaction.

To install the Interaction component:

1. Log in to the portal host computer as the same user that installed AquaLogic Interaction.
2. If you are running on a Java application server, shut down the application server.
3. Launch the Analytics Installer.

- Windows: ALAnalytics_ALI_v2-1.exe
- UNIX/Linux: ALAnalytics_ALI_v2-1

4. Choose to install the Interaction component.
5. After the installation is complete, perform one of the following:

- If you are running on Java, restart the application server. Then redeploy your portal.war or portal.ear file to your portal application server.
- If you are running on IIS, restart IIS.

### Installing the Image Service Component

For more complete details on performing this task, see Installing the Image Service Component.

To install the Image Service component:

1. Log in to the Image Service host computer as the local administrator or the ALI user created during installation of AquaLogic Interaction.
2. Copy the installer to the disk location from where you plan to launch it.
3. Launch the Analytics Installer.

- Windows: ALAnalytics_ALI_v2-1.exe
- UNIX/Linux: ALAnalytics_ALI_v2-1

4. Choose to install the Image Service component.

### Installing the Automation Service Component

For more complete details on performing this task, see Installing the Automation Service Component

To install the Automation Service component:

1. Log in to the Automation Service host computer as the local administrator or the ALI user created during the installation of AquaLogic Interaction.
2. Copy the installer to the disk location from where you plan to launch it.
3. Launch the Analytics Installer.

- Windows: ALAnalytics_ALI_v2-1.exe
- UNIX/Linux: ALAnalytics_ALI_v2-1

Note: | Ensure that you copy the installer for the same platform that the Automation Service runs on. For example, if the Automation Service runs on Solaris, copy the Solaris installer.

4. Choose to install the Automation Service component.
5. Launch the Analytics Configurator:

- In Windows, choose Start | Programs | BEA | Analytics Configurator.
- On UNIX or Linux, open http://localhost:11944/configurator/ui/start.jsf in a web browser.

### Starting Analytics and Portal Services

For more complete details on performing this task, see Starting Analytics and Portal Services.

To start Analytics and portal services, perform one of the following:

- On Windows, ensure the BEA AL Analytics service has been started in Windows NT Services. Then ensure the BEA AL Analytics Collector service has been started.
- On UNIX and Linux, ensure the BEA AL Analytics service has been started by using the following command:

install_dir/ptanalytics/2.1/bin/analyticsd.sh start.

Then ensure the BEA AL Analytics Collector service has been started by using the following comment:

install_dir/ptanalytics/2.1/bin/collectord.sh start

### Registering Analytics with the Portal

This section describes how to register the Analytics Console, remote server, web service, and portlet objects. For more complete details on performing this task, see Registering Analytics with the Portal.

To register the Analytics application, remote server, web services, and portlets with the portal, use the migration utility to import the migration package analytics.pte.

### Importing the Ensemble Migration Package

This section describes how to register the Ensemble application with the portal for use with Analytics. You only need to perform this procedure if you are integrating Ensemble with Analytics. For more complete details on performing this task, see Importing the Ensemble Migration Package.

To register the Ensemble application, use the migration utility to import the migration package analytics_ensemble.pte.

### Adding Analytics Jobs to the Automation Service

This section describes how to add all Analytics jobs to the Automation Service. Once Analytics Jobs are added to the Automation Service, the Automation Service runs them automatically. For more complete details on performing this task, see Adding Analytics Jobs to the Automation Service

To add Analytics jobs to the Automation Service:

1. Log into the Administrator Portal.
2. In Administration, choose Automation Service.
3. Ensure that the Automation Service is online.
4. Under Edit Automation Services, click the name of the computer on which Analytics Jobs are installed.

The Register Folders window appears.

5. Click Add Folder.

The Add Job Folder window appears.

6. Expand the Analytics folder.
7. Select the Analytics Jobs folder.
8. Click OK to close the Register Folders window.
9. Click Finish.

The Automation Service runs the Analytics jobs. If other Automation Service jobs were in queue or running when you added the Analytics jobs to the Automation Service, the Automation Service runs the Analytics jobs after these other jobs have completed.

10. At an appropriate time, ensure that the Analytics jobs have completed successfully. If any Analytics jobs failed, schedule these jobs to run again.

## Upgrade

### Upgrade Paths

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

Table 3-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.1 to 2.1. To do so, you must first upgrade Analytics 1.1 to either 1.2 or 2.0, then perform the appropriate upgrade to Analytics 2.1.

### Upgrading Analytics

This section discusses:

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

#### Upgrading Analytics from Version 2.0 to 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 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) Register Ensemble events by running the following from the command line on the Analytics host machine:

- 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 analysis tool on both the portal and Analytics 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 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 BEA 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 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 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) Register Ensemble events by running the following from the command line on the Analytics host machine:

- 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

13. (Oracle only) Run your database's analysis tool on both the portal and Analytics 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.