Move and rename a tag at the database level (LicenseMonitor)


These instructions explain how to rename a tag in LM and link the historical data from the old tag, to the new one. They assume that the new tag has not been created.

If the new TAG has been created please see the related instructions: Update data of an old TAG to a new TAG in LM's database 

Note: Be sure to have the shell enabled with the right project vovproject enable  <name>.

  1. Create a new tag in the database that matches the one you'll be using for the tag in the monitor configuration:
    vovsql_query -rw -x "insert into tags (name) values ('MyNewTag')"
  2. Get the new tag ID:
    vovsql_query -e "select id from tags where name='MyNewTag'"
    Let's say this returns 20.
  3. Get the old tag ID:
    vovsql_query -e "select id from tags where name='MyOldTag'"
    Let's say this returns 19.
  4. Make note of the feature IDs that you need to move from the old tag:
    vovsql_query -e "select id,name from features where tag_id=19"
    Let's say you get something like:
    112 Compiler
    113 Simulator
  5. Move them to the new tag:
    vovsql_query -rw -x "update features set tag_id=20 where id in (112,113)"
    Now, update the summary tables:
    % ftlm_summary -full -tag MyOldTag
    % ftlm_summary -full -tag MyNewTag
    When the commands finish, the old tag name can be renamed.
  6. Through the LM web interface,go to Admin > Monitors.

  7. Scroll down and click Edit on the TAG to be updated.

  8. Change the name and any other fields needed and click Update on the bottom left.

  9. After a couple minutes, the new tag should show up in the Current tab.