The update of CAST AIP schemas/databases is achieved using the GUI based application CAST Update Tool. If you need to automate these tasks, then you can do so by using the CLI (Command Line Interface) provided by the CUT-CLI.exe tool. This document explains how.
Before you can starting using the CAST Update Tool CLI, you must ensure that you meet the following requirements:
|An installation of CAST AIP is required - either a Full Installation or a All Application Intelligence Platform Applications installation (see Install CAST AIP components), which must be located on the machine you wish to run the CLI from.|
|A CAST Management Studio connection profile specifying the target RDBMS/CSS must already exist.|
- You should read and fully understand Upgrading to CAST AIP 8.3.x and make any preparations before you attempt to automate the upgrade process using the CLI!
- Note that the CAST Update Tool CLI does not allow you to choose specific schemas for update, as is the case with the GUI. All schemas identified by the tool in the corresponding .PMX connection file as "not up to date" WILL be subject to an upgrade process. You should use the GUI if you do not want to upgrade all schemas.
- Note that the CAST Update Tool CLI does NOT allow you to upgrade a Measurement Service schema. You must use the CAST Server Manager CLI to do this - see Automating CAST Server Manager installation tasks.
How does it work?
To execute an action via the command line, you must specify the CUT-CLI.exe executable (rather than the CUT.exe executable which is used for the GUI). There are various mandatory and optional (enclosed in square brackets) options. Each option is listed and explained below.
- The examples listed below should be placed on one line if they are being used in a batch file.
- The CLI invokes one instance of CAST Server Manager for each Service schema to be upgraded
- There is a queue limit depending on the number of CPU available. If, for example, you have a five core/CPU, and you have 10 Services, it will only launch the update of five Services and will queue the others.
- Use the -h command to list all possible options, for example:
|-productInstallationDir||Specifies the CAST AIP installation directory from which the upgrade will be run (i.e. Services will be upgraded to the version of CAST AIP installed to this location). Enclose paths containing spaces using quote marks.|
|-pmxFileLocation||Specifies the full path to a CAST Management Studio .PMX file. If not used, the PMX file for the current version of CAST AIP will be used. Enclose paths containing spaces using quote marks.|
This option allows you to choose one of the following upgrade options for the CAST Assessment Model. These options are listed below together with their corresponding option in the GUI. See Upgrading to CAST AIP 8.3.x for more information about what each option does. If the option is not specified, the command line process will fail.
|-y||Adds a decision prompt. This option is mandatory and provides a fail safe to prevent the upgrade action from starting unless the Y key is pressed. It also allows you to view the list of CAST schemas that will be subject to an upgrade BEFORE the upgrade begins.|
|--t||Sets the number of instances of Server Manager that the CAST Update Tool can simultaneously launch. The default value is defined by the number of cores in the processor of the computer (one instance per core).|
|-logFile||Use this option to output the log to file - please specify a .castlog2 suffix (you can view this type of log file with the Cast2LogViewer (see 2.1.1. Validate and Accept the Delivery). Enclose paths containing spaces using quote marks.|
Running the above command will produce output similar to the following:
This shows that three Management Service schemas were identified in the PMX file and each is flagged as "NOT_UP_TO_DATE", i.e. the version number is below the version number of the release of AIP you wish to upgrade to. Below that, the tool lists the number of repositories (i.e. Analysis, Dashboard, Management Service schemas) that are "NOT UP TO DATE" and which will be subject to an upgrade process on clicking Y to continue.
Consulting the report, configuration and log files
Alongside any log file generated bu the CLI tool using the -logFile option, other configuration files and logs files are stored in the CUT directory (%TEMP%\CAST\CAST\<version>\CUT). The following files are of interest:
- The complete upgrade report: Report-DD_MM_YYYY-HH_MM_SSS.xml (Errors and upgrade status of the reports)
- The CAST Server Manager report log-database-descriptor-<SCHEMA>-DD_MM_YYYY-HH_MM_SSS.castlog (same as the CAST Server Manager standard log).
- The Configuration file database-descriptor-<SCHEMA>-DD_MM_YYYY-HH_MM_SSS.xml (the configuration file is used by CAST Server Manager. One configuration file will exist for each upgraded schema).