Tags live in the Process Center repository tables, one row per (artifact, tag). The tag name is a library item of its own; tagging every artifact of a process app / toolkit with one tag means inserting a row for each po_id (library item) into the tag link table. Because the Process Center caches the repository, the supported way is the designer or the REST API; the SQL below shows the model and is for a stopped Process Center or a copy of the database:
-- tables (BPM 8.5.x / BAW): LSW_TAG (tag definitions) and the tag link table (po_id, tag_id, po_type, branch) - query the catalog for LSW_TAG% on your level
select * from lsw_tag where name = 'Legacy';
-- every library item of the tip of a branch
select po.po_id, po.po_type, po.name from lsw_po_versions po where po.branch_id = '<branch id without 2063.>';
Practical alternatives that do not touch the tables:
- Process Designer (web): library > select all items of a category (Shift-click) > Tag > new tag - the designer supports multi-select tagging since 8.5.7.
- twx export / import: tags are stored in the exported .twx as tag objects linked to the library items; a script can add the links to every object and the package is imported as a new snapshot (the internal designer REST API /rest/bpm/wle/pd/v1 is undocumented and not recommended).
- Smart folders (8.5.7+): a saved search on names / types / modified date often replaces mass tagging altogether.
Whatever you do at the SQL level, do it on a stopped Process Center, with a backup, and verify in the designer afterwards - table names and columns differ per release (query the catalog for LSW_TAG%%).
References