Device Alias in the UIM Database
search cancel

Device Alias in the UIM Database

book

Article ID: 217642

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

Where in the database can we find the device alias?

Environment

Release : 20.3+

Component : UIM Operator Console - Inventory

Resolution

The alias information is part of the CM_COMPUTER_SYSTEM_ATTR table.  These records have a key and a value.  The field you are looking for is cs_attr_key = DisplayAlias.  The alias displayed in OC will be the in that record under the cs_attr_value field.  You can join the CM_COMPUTER_SYSTEM table with the ATTR table on the cs_id field similar to the following:

Get a list of all systems and their alias:

SELECT 
CS.ip,
CS.name,
CSA.cs_attr_key,
CSA.cs_attr_value
FROM CM_COMPUTER_SYSTEM_ATTR as CSA
JOIN CM_COMPUTER_SYSTEM CS on CS.cs_id=CSA.cs_id
WHERE CSA.cs_attr_key='DisplayAlias' order by cs.name

Get an alias for a specific system:

SELECT 
CS.ip,
CS.name,
CSA.cs_attr_key,
CSA.cs_attr_value
FROM CM_COMPUTER_SYSTEM_ATTR as CSA
JOIN CM_COMPUTER_SYSTEM CS on CS.cs_id=CSA.cs_id
WHERE cs.name like '%system_name%' CSA.cs_attr_key='DisplayAlias'