Patch 19 Licensing Scripts for External DBAs

Overview

NOTE: Patch 19 licensing scripts do not apply to Cloud, only Enterprise, and must be run as DA.

Following the release of Patch 19, clients are being asked to allocate the correct number of users to their license pools via the Enterprise Maintain License Pools screen in the System Data module so that administrators can perform patch testing in a non-production environment as part of the Patch 19 licensing exercise based on their sales discussions.

To help ensure a smooth transition during this process, licensing scripts are available for external DBAs:

  • Script 1: Used to help move assigned users in the Maintain License Pools screen from a non-production environment into a production environment.

  • Script 2: Used to move data from the Cleanup Contacts Assigned to License Pools screen in the System Data module from a non-production environment into the Maintain License Pools screen in a production environment.

These two scripts should be considered independent of one another, as each one serves a specific purpose. One or both scripts may apply, depending on specific requirements, and each should be considered separately as they are not meant to be run one after the other but rather on an as-needed basis.

For convenience, we have provided more information about each of the scripts below.

For more general information on the Patch 19 licensing scripts and types of licenses (e.g., Concurrent Licensing and Named Licensing), refer to Patch 19 Licensing Scripts.

NOTE: The Maintain License Pools screen being discussed here is an Enterprise screen. A similar screen exists for Field but it does not apply here.

Script 1: Moving Maintain License Pool Users from Non-Prod (Source) to Prod (Target) Environment

To allow administrators to bypass populating users again in their production environment, a script is available so that assigned users in the Maintain License Pool screen from a non-production environment (e.g., Test, Conversion, or Train) can be moved into a production environment.

NOTE: If required, data can be moved from one non-production environment to another non-production environment.

Script name: extractpoolcontactdata.sql

Script is located in: D:\cm\v12\ENV\SQL folder

Conditions

To be used under the following conditions:

  • Both environments, source and target, are on the same patch, and HF.

  • Patch 19-2 and Standard HF2 are already installed. Also, mandatory standard installation: 23.70828 WI #30,31,33,34,36,37 must be installed.

  • Ideally, the source environment was cloned from the target environment prior to upgrading to patch 19-2. This ensures most of the data to be transferred is relevant.

  • Ideally, the same license agreement was installed in both environments.

Running the Script

Part 1: Extracting the Data from Source Environment

  1. Connect as DA and run the script:

    extractpoolcontactdata.sql which spools to file importpoolcontactdata.dat

  2. Open the DAT file produced to ensure it is not empty and it has no errors. The generated file includes a line informing when it was extracted and the database name.

Part 2: Install the DAT file in the Target Environment

  1. Connect as DA and run the script:

    importpoolcontactdata.dat which spools to file importpoolcontactdata.lst

  2. It will print information such as database you are connected to and timestamp. It will inform you of the backup tables created (before and after running the process). It will print errors raised, with some of those errors valid (e.g., users already assigned, maximum limit of the pool reached, UserID not valid, etc.).

Copy Process

The following actions take place during the copy process:

  • This process does not delete/update, it only inserts if possible.

  • In the source environment, it extracts data from the Maintain License Pool screen; and in the target environment, it inserts into the Maintain License Pool screen. The API routine used to insert validates that the user exists and that the contact exists and is associated to the user ID record. It also ensures that the pool exists and that the maximum allowed per pool is not violated.

Script 2: Moving Cleanup License Pool Data from Non-Prod (Source) Environment into Maintain License Pool Prod (Target) Environment

This script is used to copy data from the Cleanup Contacts Assigned to License Pools screen into the Maintain License Pools screen.

If a client has assigned users to the Cleanup Contacts Assigned to License Pools screen in Patch 17 in preparation for Patch 19, this script will allow for copying this data from the Cleanup Contacts Assigned to License Pools screen into the Maintain License Pool screen in Patch 19 so that it is not necessary for administrators to duplicate this exercise of allocating users to pools.

Script name: copyCleanContactsAssignedToPools.sql

Script is located in: D:\cm\v12\ENV\SQL folder

Conditions

To be used under the following conditions:

  • The customer used the Cleanup Contacts Assigned to License Pools screen to perform license cleanup prior to upgrading to 19-2 as part of the preparation for the upgrade.

  • Patch 19-2 and standard HF2 are already installed. Also, mandatory standard installation: 23.70828 WI #30,31,33,34,36,37 must be installed.

  • New license agreement is already installed.

NOTE: The conditions above are very important since the copy process will delete all existing data from the Maintain License Pool screen and copy based on the license agreement.

Running the Script

After patch, HF, and other installation files have been installed, including the new license agreement, complete the following steps:

  1. Connect as DA and run the script to copy the cleanup license data:

    copyCleanContactsAssignedToPools.sql which spools to file copyCleanContactsAssignedToPools.lst

  2. A confirmation message will be displayed to explain the action to be performed and to confirm if you would like to proceed. Answer Y(y) or N(n).

    If the value entered is not Y(y), the process will stop.

    If the reply is Y (y), it will then copy data from the Cleanup Contacts Assigned to License Pools table to the Maintain License Pools table based on the license pools defined and ensure UserId exists and contact associated to the User is correct. It will copy up to the maximum slots defined per license pool, which means that records might be left out if the maximum is reached.

Copy Process

The following actions take place during the copy process:

  • Deletes data from Maintain License Pool table as all data will be replaced with the clean data.

  • Copies valid data from Cleanup Contacts Assigned to License Pools to Maintain License Pools table; valid as: contact exists and associated to a user ID record.

  • Copies as many contacts as allowed by the pool size. If more contacts exist in the Cleanup Contacts Assigned to License Pool table, then those are ignored.

  • Raises an error if duplicates are found, however this should not happen.