change the data type of the extension using back end scripts for ITAM
search cancel

change the data type of the extension using back end scripts for ITAM

book

Article ID: 368489

calendar_today

Updated On:

Products

CA Service Management - Asset Portfolio Management CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

Changing the data type for fields already created in ITAM that cannot be deleted (Data deletion may cause data loss and inconsistency).

Environment

ITAM 17.x

SDM 17.x

SQL Server

Resolution

Please take the mdb backup first  &  then try the below steps on your test environment. 

Once the testing is completed successfully, run the same on the production environment.

 

  1. For example : Created assetinttochar   simple extended field of type integer on "AssetGlobal All families" configuration

  2. usp_owned_resource table has the column assetinttochar with int type

  3. Asset record  'AssetExtTest' created with this extended field with integer value 1234

  4. Now execute the following queries on SQL management studio:
    ALTER TABLE usp_owned_resource  ALTER COLUMN assetinttochar nvarchar(20);
    ALTER TABLE aud_usp_owned_resource  ALTER COLUMN assetinttochar nvarchar(20);
    update arg_field_def set data_type=10 , data_size=20 where table_name='usp_owned_resource' and field_name='assetinttochar'
    update arg_field_def set data_type=10 , data_size=20 where table_name='aud_usp_owned_resource' and field_name='assetinttochar'


  5. Go to Asset->AssetGlobal All families configuration , config on mode

  6. Go to newly created extended field i.e. assetinttochar   

  7. Click on Data validation icon , we can see regular expression   ^-?\d+$,     remove it, click Ok.

  8. Save configuration

  9. Run:  IISRESET (restart IIS Services)

  10. Now to try to save the Asset with along with this extended field value as characters