Upgrade Monitor using the Direct Database Method on Windows
Administrators are best served by this upgrade method if a few hours or less of license usage reporting downtime is acceptable, or if you are not currently running a database in your Monitor project.
Before starting, check if a license update if needed. Consider the following:
- If using a keyfile license, no license upgrade is needed.
- If using an RLM license, switch to an ALM license model
Note: If setting the environment variable is confusing,
just capture the folder path and location and make a note of it.
Tip: Reference the Database Upgrade Process for
Linux if you need further detailed explanations.
- Run a database backup from the web portal by clicking Admin > System > Database Information.
-
Set the project name environment variable:
% set LM_NAME=<Monitor_project_name>
For example:% set LM_NAME=licmon3
-
Set the project environment:
% $OLDVOVDIR\bat\vovinit.bat
For example:C:\altair\lm_2210\win64\bat\vovinit.bat
- Log on to the Monitor web portal and check the DB engine version by clicking Admin > System > Database Information. Scroll to the bottom of the page and check the Engine Version. If Engine Version is 14.4, you do not need to upgrade.
-
Verify and take note of the current VOVDIR. For example:
set | findstr VOVDIR VOVDIR=C:/altair/lm_2210/win64
-
Run the following command:
% set OLDVOVDIR=C:/altair/lm_2210/win64
-
Stop the Monitor project:
% lmmgr stop –name %LM_NAME% -force
For example:lmmgr stop -name licmon3 -force
-
Source the vovinit.bat file to access the newly installed software:
% $NEWVOVDIR\bat\vovinit.bat
For example:C:\altair\lm_2311_2\win64\bat\vovinit.bat vovinit: VOV has been initialized VOVDIR=C:/altair/lm_2311_2/win64 vovinit: Checking for C:/altair/lm_2311_2/win64/local/vovinit.bat
-
Start the Monitor project:
% lmmgr start –name $LM_NAME
For example:lmmgr start –name licmon3
-
Enable the shell for a Monitor project and verify that the database has not
started, because of the version change:
% vovproject enable $LM_NAME
For example:vovproject enable licmon3 vovproject 08/15/2023 16:41:11: message: Enabling project 'licmon3'...
-
Run the following command:
vovdb_util showcfg
For example:vovdb_util showcfg vovdb_util 08/15/2023 16:41:33: message: The VOV database configuration is: vovdb_util 08/15/2023 16:41:33: Host: localhost vovdb_util 08/15/2023 16:41:33: Port: 14991 vovdb_util 08/15/2023 16:41:33: Data Path: C:/altair/db/lm_2210_33 vovdb_util 08/15/2023 16:41:33: Status: error vovdb_util 08/15/2023 16:41:33: AutoBackup: enable 0 period 604800 root {} startFrom 1 startTo 4 keep 3
If a database upgrade is not needed, and the database is running, you are done. Otherwise, continue with the procedure.
- Prepare for a database file format upgrade. The following steps will create an upgraded copy of the Monitor database which will be stored in the same directory as the old one. The new database file directory created will have a new versioned directory name like dbdataNN_M where NN_M is the PostgreSQL software version. Before doing the conversion, check that the filesystem has enough space for another directory of about the same size. The old database directory will be left in place.
-
Capture the old Postgres bin path:
% set OLDPG=C:\altair\lm_2210\win64\postgresql9_6\bin
-
Capture the old data path folder:
vovdb_util showcfg | findstr 'Data Path'
For example:vovdb_util showcfg | findstr "Data Path" vovdb_util 08/15/2023 16:45:46: Data Path: C:/altair/db/lm_2210_33
-
Use this example to set DBPATH to /DBDIR/dbdata9_6 or
DBDIR/dbdata9_4 as appropriate.
% vovdb_util upgrade -sdb %DBPATH% -spgsw %OLDPG%
For example:vovdb_util upgrade -sdb C:\altair\db\lm_2210_33\dbdata9_6 -spgsw C:\altair\lm_2210\win64\postgresql9_6\bin vovdb_util 08/15/2023 16:55:29: message: sourceVer: 9_6 vovdb_util 08/15/2023 16:55:29: message: targetVer: 14_4 vovdb_util 08/15/2023 16:55:29: message: Preparing to upgrade VOV database to version 14.4: vovdb_util 08/15/2023 16:55:29: Source Dir: C:\altair\db\lm_2210_33\dbdata9_6 vovdb_util 08/15/2023 16:55:29: Version: 9.6 vovdb_util 08/15/2023 16:55:29: Target Dir: C:/altair/db/lm_2210_33/dbdata14_4 vovdb_util 08/15/2023 16:55:29: Version: 14.4 vovdb_util 08/15/2023 16:55:29: vovdb_util 08/15/2023 16:55:29: The upgrade process creates a copy of the database for use with the new version of PostgreSQL. There must be free disk space greater than the size of the current database. The original files will remain after the upgrade, but may be deleted at any time to reclaim disk space. vovdb_util 08/15/2023 16:55:29: Upgrade database (yes/no)? yes vovdb_util 08/15/2023 16:55:49: message: Proceeding with upgrade. vovdb_util 08/15/2023 16:55:49: message: Configuration of upgrade vovdb_util 08/15/2023 16:55:49: message: ::PGBINOLD (Source Bin): C:\altair\lm_2210\win64\postgresql9_6\bin vovdb_util 08/15/2023 16:55:49: message: ::PGBINNEW (Destination Bin): C:/altair/lm_2311_2/win64/postgresql14_4/bin vovdb_util 08/15/2023 16:55:49: message: ::PGDATAOLD (Source Data): C:\altair\db\lm_2210_33\dbdata9_6 vovdb_util 08/15/2023 16:55:49: message: ::PGDATANEW (Destination Data): C:/altair/db/lm_2210_33/dbdata14_4 vovdb_util 08/15/2023 16:55:49: message: Checking DB state at location: C:\altair\db\lm_2210_33\dbdata9_6 vovdb_util 08/15/2023 16:55:49: message: Creating new database instance. The files belonging to this database system will be owned by user "jlin". This user must also own the server process. The database cluster will be initialized with locale "en-US". The default text search configuration will be set to "english". Data page checksums are disabled. ...
-
After the database file upgrade completes, the PostgresSQL database may be
started by:
% vovdb_util startdb
For example:vovdb_util startdb vovdb_util 08/15/2023 16:57:51: message: Starting database... vovdb_util 08/15/2023 16:57:51: message: Checking user privileges vovdb_util 08/15/2023 16:57:51: message: User is not admin or service. vovdb_util 08/15/2023 16:57:51: message: Starting database ...
-
Ensure that all checkouts that occurred while the database was offline get
loaded into the database:
% lmmgr loaddb -v
For example:lmmgr loaddb -v lmmgr 08/15/2023 16:59:59: message: Loading all data files into the database... lmmgr 08/15/2023 16:59:59: message: Load all checkouts that come from sampling ...