LeasePak Server Upgrade and Conversion

For LeasePak versions 5.1a or 5.2a.

Describes the upgrade and conversion procedures from LeasePak versions 5.1a or 5.2a to version 6.1a

LeasePak 6.1a: New Server Platform

Oracle users on versions 4.3a - 5.3a: you must first upgrade to version 6.0b before upgrading to version 6.1a.

Upgrading to LeasePak 6.1a-requires OS and DBMS platform changes (as specified in the 6.1a System Requirements). This documentation assumes that you are installing the new OS and DBMS server software on a machine different from the one running your current version of LeasePak.

In the following procedure, the term 'old/current server' refers to the machine running your current version, and the term 'new server' refers to the machine on which you will install version 6.1a.

The old and new servers must both be connected to your network until the upgrade procedure is complete.

If you must upgrade to LeasePak 6.1a-using only one server, or if you are already running your current version of LeasePak (version 5.3a, for example) on the 6.1a-platform (as specified in the 6.1a System Requirements), do not use this procedure. Instead, contact your NetSol representative for the correct procedure.

Old/Current Server: Preparation

Old/Current Server: User Processes

Notify users in advance that the old server (the server running the current version of LeasePak) will be unavailable during the upgrade. At the scheduled start time, use the following steps to stop any remaining user processes

1. Log on the server as root
2. Use the ps command to list LeasePak drivers running on the server

ps -ef | grep lpa 

This not only lists instances of the main LeasePak program lpadriver.exe, but also lists other LeasePak processes, such as the End of Period program lpaeopdrvr.exe and the LeasePak utilities program $uexe/lpautil.exe, as well as any oracle instances running on an oracle database named according to our recommended standards ('lpak').

3. If any of these processes need to be stopped, use the kill command

kill id 

where id is the process id number.

4. Sybase only: list (and stop, if needed) any remaining processes within Sybase

a. Start isql in 132-column mode

isql -Usa -w132 

b. Use sp_who to list user processes. The terminal will display something similar to the following

                fid   spid     status       loginame     dbname
                ---  ----  -----------   --------     ----------
                  0     1       running        sa             master
                  0     7      recv sleep    ernesto       production               

c. If any of these processes need to be stopped, use the kill command

kill spid 

where spid is the process id number.

Old Server: Sybase Account Names

For the new version of Sybase on the new server, you will need to recreate the Sybase user accounts. Use these steps to save a list of the account names from the old server:

1. Using cat, create a script to use within isql. For example:

cat > get_names.sql <<stop

where the script contains the following lines

            ? use master
            ? go
            ? select name from syslogins
            ? go
            ? stop
           
2. Use isql to run the script and save the output to a file. For example:

isql -Usa -Psa_password -iget_names.sql > $HOME/login_names.rpt

where sa_password is the sa password.

Old/Current Server: End of Period

Run End of Period for all portfolios in all environments you are upgrading. After End of Period is finished, do not make changes to any of the databases. You may also want to limit user access to the server and DBMS server once End of Period is complete.

Old/Current Server: Backup

Perform either a full or incremental backup of the server as needed.

New Server: Installation

 Sybase Users Only: Check Payment Master (rpm) Conversion

If you have Cash Control or other conditions resulting in rpm (Check Payment Master) records, before running the upgrade or conversion, make sure your system is set with adequate space for the conversion of the rpm table.

The following instructions are from the s53alpux_proc2rpm conversion script file:

    FILE SYSTEM SPACE PLANNING
    
    This script will use $datasets by default for all of its work.
    This script will need space for the following items:
          1.  FileSystem/Directory #1 (FS_DIR_1) - the entire rpm table in bcp format
              at approximately 165 bytes/record
          2.  FileSystem/Directory #2 (FS_DIR_2) - chunks of rpm table in bcp format
              expanded by 14 bytes/record
    The number and size of chunks to allow on FS_DIR_2 are controlled by parameters
    below.
    
    This script will set FS_DIR_1 and FS_DIR_2 to a subdir of $datasets unless the
    values #  V53A_RPM_FS_DIR_1 and V53A_RPM_FS_DIR_2 are in the environment; if
    either is present, then it will override the corresponding use of $datasets.
    
    RPM_CHUNKS will be set to 4 by default, but this can be overridden in the
    environment by setting V53A_RPM_CHUNKS.
    
    Each chunk will contain 50,000 records, or approximately 8.25 megabytes, of
    expanded RPM data.  The number of records, RPM_RECS, will be set to 50000,
    but this can be overridden in the environment by setting V53A_RPM_RECS.
    
    So the space required on FS_DIR_2 is V53A_RPM_CHUNKS * V53A_RPM_RECS * 179.
    This script bcp's the chunks back into the database in parallel, concurrent
    processes, and creates new chunks as space becomes available.
    
    A final tuning parameter is the bcp batch size.  The bcp client groups
    input records together into batches and dispatches the batches to the data-
    server.  The default batch size is contained in the environment variable
    SYB_BCP_BATCHSIZE and is set by NetSol according to our experience.  Your
    experience may vary and you may override the batchsize by setting the
    variable V53A_RPM_BATCHSIZE in the environment.

   
You can find these and other rpm conversion instructions in the file $live/conv/syb/s53alpux_proc2rpm. For more information, contact your NetSol representative.

New Server: System Requirements

New system requirements are in place for version 6.1a. Refer to the System Requirements document for more information.

New Server: OS and DBMS Installation

Install and configure the OS (HP-UX, Linux, or Solaris) and the DBMS (Oracle or Sybase) appropriate to your platform using the instructions listed in LeasePak Server Preparation and Installation and related documents.

New Server: OS and DBMS User Accounts

Recreate the OS accounts on the new server using the LeasePak user names and OS server passwords. Recreate the DBMS accounts on the new server using the LeasePak user names and DBMS passwords.

New Server: LeasePak 6.1a-Installation

Complete the following sections from LeasePak Server Preparation and Installation:

LeasePak Versions and Servers Bridge

Use the following procedures to create a bridge between the old and new versions of LeasePak.

New Server: Old Version msiadmin and msidba Accounts

On the new server, create administrative accounts for your old (current) version of LeasePak. For example, if you are upgrading from LeasePak 5.3a to 6.1a, create accounts for admin53a and dba53a.

As shown in the example above, you must give these administrative accounts different names than the ones you are using for version 6.1a.

New Server: Old Version LeasePak Installation

On the new server, install your old (current) version of LeasePak, using the administrative account names created in the previous step.

After installing the old version, remove its drivers and Queue Manager.

Using LeasePak 5.1a as an example:

        rm -rf /opt/msi/v51a/live/exe/*

       
Then one of the following, depending on how your system is configured:

Use /etc instead of /sbin for SunOS and Linux.

rm -rf /opt/sector7/v51a/s7_3_17 

And:

rm /sbin/init.d/v51a_sector7.queorrm /sbin/init.d/qmgr_v51a 

And:

rm /sbin/rc1.d/*v51a_sector7.queorrm /sbin/rc1.d/*qmgr_v51a 

And:

rm /sbin/rc3.d/*v51a_sector7.queorrm /sbin/rc3.d/*qmgr_v51a 

Also, use vi to edit /etc/services and /etc/inetd.conf to remove references to the v46a leasepakd daemon. The procedure for Linux is slightly different--refer to LeasePak Server Configuration and Maintenance for more information.

NFS-Mounted Partition from Old to New Server

Using LeasePak 4.6a as an example:

Old server: export /opt/msi/v46a to make it available to NSF.

New server: NFS-mount the old server's /opt/msi/v46a as /opt/oldmsi/v46a.

Datasets Link

Again using LeasePak 4.6a as an example, link in to the new server the datasets from the old version of LeasePak on the old server:

New server:

    rm -rf /opt/msi/v46a/datasets
    ln -s /opt/oldmsi/v46a/datasets /opt/msi/v46a/datasets

LeasePak Environment and Database Upgrade

The following procedures use LeasePak 4.6a as the example for the old version and 6.1a as the new LeasePak version.

LeasePak Database Snapshot

Old server, old version:log on to your old server using the msidba account and run snapshot-for each LeasePak database you wish to convert to the new version.

Placeholder Environment and Database

For each LeasePak environment/database you wish to upgrade:

New server, old version: Log on to your new server using the admin46a account (the 4.6a msiadmin account on your new server) and create a placeholder environment for the upgrade.

New server, old version:Log on to your new server using the dba46a account (the 4.6a msidba account on your new server) and create a placeholder database for the upgrade.

New server, old version:Still using the dba46a account (the 4.6a msidba account on your new server), use restore-to restore the appropriate 4.6a snapshot into the placeholder database.

Environment Upgrade

For each LeasePak environment you wish to upgrade:

New server/new version:

1. Log on the server as msiadmin (for Multiple Concurrent Versions, see note below)

Terminal emulation: you must use one of the supported terminal types. Refer to the System Requirements for more information.

Multiple Concurrent Versions: if you are running more than one version of LeasePak on the same server using separate msiadmin and/or msidba accounts, use the accounts belonging to the new version of LeasePak to run upgrade_env and sgenlpux_conversion.

2. Run upgrade_env

upgrade_env [new-setup-env-flags]  path-to-old-environment-to-upgrade [build-id]

where new-setup-env-flags are the optional flags and build-id is the build descriptor as described in the Environment and Database Configuration section of LeasePak Server Configuration and Maintenance. Note that both the new-setup-env-flags and build-id are optional--in most cases, you do not need either to run upgrade_env.

3. The terminal will display something similar to the following

2008-03-06 03:12:23 upgrade_env: Start  /opt/msi/v61a/prod 
    2008-03-06 03:12:24 setup_new_env:  PRODUCTION prod syb SERVER_SYBASE lpr_prod live; Start
    2008-03-06 03:12:25 setup_new_env: Creating environment directory structure...
    2008-03-06 03:12:25 setup_new_env: Creating syb_use...
    2008-03-06 03:12:25 setup_new_env: Creating logdb.*...
    2008-03-06 03:12:27 setup_new_env: Creating envdb.msirc...
    2008-03-06 03:12:28 setup_new_env: Creating msidba placeholders...
    2008-03-06 03:12:28 setup_new_env: Creating .lp*...
    2008-03-06 03:12:28 setup_new_env: Setting environment security...

    You will need the following for LeasePak PC Client setup:
    IP Address or name: server
    Environment name:   prod
    Server Port:        6100
    2008-03-06 03:12:29 setup_new_env: End
    2008-03-06 03:12:29 upgrade_env: Cannot delete old environment.  Please remove it manually
    2008-03-06 03:12:29 upgrade_env: End
.lplogin and .lpprofile

If needed, copy the .lplogin and .lpprofile files from the $top/env/environment/etc directory (where environment is the upgraded LeasePak environment to the $HOME directory of the environment's LeasePak administrative user (lpadmin, not msiadmin; you must leave msiadmin tied to the administrative environment) and modify them to create the appropriate startup files, or log on the server as msiadmin and run change_env to switch the environments. For more information on .lplogin and .lpprofile, refer to the lpadminsection of the document LeasePak Server Configuration and Maintenance.

Database Upgrade


Oracle

For each LeasePak database you wish to upgrade, run /opt/msi/v60b/live/conv/ora/ora_v60b_conversion.

To see a complete example of the ora_v60b_conversion output, click here (opens in a new window).

 Sybase

For each LeasePak database you wish to upgrade:

New server/new version:

1. Log on the server as msidba (for Multiple Concurrent Versions, see note below)

Terminal emulation: you must use one of the supported terminal types. Refer to the System Requirements for more information.

Multiple Concurrent Versions: if you are running more than one version of LeasePak on the same server using separate msiadmin and/or msidba accounts, use the accounts belonging to the new version of LeasePak to run upgrade_env and sgenlpux_conversion.

2. Run sgenlpux_conversion

sgenlpux_conversion environment starting-release [dbo-password [srvadm-password]]

where environment is the name of the environment whose database you are converting, starting-release is your version of LeasePak before the upgrade (for example, v51a), dbo-password is the database owner password, and srvadm-password is the DBMS server administrator password. For the dbo-password and srvadm-password, do not enter these on the command line; LeasePak will prompt you for them if and when necessary.

3. The terminal will display something similar to the following, then prompt for the dbo password (if necessary)

2008-03-03 00:54:10 sgenlpux_conversion: Convert prod environment from v51a to v61a2008-03-03 00:54:10 sgenlpux_conversion: Start
2008-03-03 00:54:10 sgenlpux_conversion: Running commands as DBO: lpr_prod
Database Owner 'lpr_prod' password:

4. Type the dbo password for the database and press Enter. The terminal will prompt for the srvadm password

Server Administrator 'srvadm' password:

5. Type the srvadm password and press Enter. The conversion may take several minutes. To see a complete example of the sgenlpux_conversion output, click here.

New Server: Old Release Removal

Once the upgrade and conversion are complete, you can remove the directories and contents of the old LeasePak and LeasePak queue manager releases. Also remove obsolete listings in the /etc/services, init.d, rc?.d, and inetd (or xinetd for Linux) directories.

LeasePak Client Upgrade

Follow the procedures in the Upgrade and Conversion section of LeasePak 6.1a-Client to upgrade the LeasePak client software.