Update data of an old tag to a new tag in LM's database (LicenseMonitor)

ybouvron
ybouvron
Altair Employee
edited February 2023 in Altair HPCWorks

You may need to move a license file, which will require a change in the name of a TAG at the database level. These instructions explain how to move the features of an old LM tag to a new tag, which has already been created.

If the tag has not been created, please go to the following instructions.

Move and rename an LM Tag at the database level

Because the new tag has already been created, features will need to be added to the new tag one at a time. This entire process could take a hours depending on the number of tag features. For this reason, we recommend that you migrate the features to the new tag first, as described in following instructions.

1.  Get the old tag ID by running the following command:

% vovsql_query -e "select id from tags where name='MyOldTag'"

Let's say this returns 19.

2.  Get the new tag ID by running the following command:

% vovsql_query -e "select id from tags where name='MyNewTag'"

Let's say this returns 20.

3.  Make note of the feature IDs in the old tag by running the following command:

% vovsql_query -e "select id,name from features where tag_id=19"

It may return the following:

112 Compiler

113 Simulator

4.  Make note of the feature IDs in the new tag:

% vovsql_query -e "select id,name from features where tag_id=20"

It may return the following:

200 Compiler

201 Simulator

5.  Feature by feature, move the checkouts/denials from the features on the old tag to the matching features on the new tag:

% vovsql_query -rw -x "update checkouts set feature_id=200 where feature_id=112"

% vovsql_query -rw -x "update checkouts set feature_id=201 where feature_id=113"

% vovsql_query -rw -x "update denials set feature_id=200 where feature_id=112"

% vovsql_query -rw -x "update denials set feature_id=201 where feature_id=113"

6. Finally, update the tables by running the following commands:

% ftlm_summary -full -tag MyOldTag

% ftlm_summary -full -tag MyNewTag