how to change the vendor name in srmdbapi view output

book

Article ID: 210076

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

SRM srmdbapi mysql database the 'vendor_name' column in the 'v_dim_device_model' view table includes the value of 'Netscaler'  for Citrix Netscaler models. The requirement is to change the vendor name from "Netscaler" to "Citrix Netscaler" to then import this info in one of external asset databases.

 

Environment

Release : 10.4.1

Component : Spectrum Core / SpectroSERVER

Resolution

While you can change the Vendor Name in your  reports see "Change Vendor Names in Reports" at https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/10-4-1/installing-and-upgrading/install-report-manager/maintenance-and-troubleshooting.html, that change will not modify the output of your select on srmdbapi  view   'v_dim_device_model' table'.

The srmdbapi view 'v_dim_device_model' table' join the reporting tables and the information related to the vendor is stored in the reporting.vendor table. 

Probably if you change the vendor_name of Vendor=5951 from Netscaler to Citrix Netscaler in the reporting db, is enough to solve the issue, however in case of a reporting db re-initialization you will lose that modification, so the following approach is preferred.

In the select you are using you could use the mysql REPLACE function to replace the vendor_name fields that contain "Netscaler" into "Citrix Netscaler" in a new output field. eg.

mysql> select *, REPLACE(vendor_name,'Netscaler','Citrix Netscaler') as new_vendor_name from v_dim_device_model where create_time >  '2021-03-04 00:00:00'\G;

...

in the output you will see a new field 'new_vendor_name' that contains the replaced string 

new_vendor_name: Citrix Netscaler

at this point is enough that you use the new field to import in the external asset database.

In this way we do not modify the content of the reporting db.