Creating index on hardware Asset (alm_hardware) table.

SNOW User8
Giga Guru

Hi All,

I have created new transform map with Hardware Asset (alm_hardware) table as a Target table. When I do Coalesce around Serial Number, I am getting the below warning

find_real_file.png

I have spent some time & tried to create an index field by clicking "Index Coalesce Fields" related list. But I am getting this failure message in my email 

Index creation began at 2019-06-17 01:07:51 Index creation FAILED at 2019-06-17 01:07:51 with error code: com.glide.db.GlideSQLException: FAILED TRYING TO EXECUTE ON CONNECTION 7: ALTER TABLE `tmp_a1371836657e`ADD INDEX (`serial_number`) /* */ Syntax Error or Access Rule Violation detected by database (Key column 'serial_number' doesn't exist in table) 

When I check Servicenow documents I got this - https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/administer/table_administration/t...

Following the above document, if I create index for Serial Number in a table (alm_hardware) - Will it destroy any of the records?  

What should I do here ? Please help me. It's urgent. 

1 ACCEPTED SOLUTION

SNOW User8
Giga Guru

Thanks for your reply. 

In Source table I have only Serial Number. Since the Asset Tag & Serial Number field has same value in Hardware Asset (alm_hardware) table. I have just updated the field  mapping to map Serial Number value with Asset tag (Serial Number >> Asset tag) . It's solved my issue. 

 

View solution in original post

4 REPLIES 4

Deepak Ingale1
Mega Sage

For above error, I would suggest to log an incident with HI support team.

 

SNOW User8
Giga Guru

Thanks for your reply. 

In Source table I have only Serial Number. Since the Asset Tag & Serial Number field has same value in Hardware Asset (alm_hardware) table. I have just updated the field  mapping to map Serial Number value with Asset tag (Serial Number >> Asset tag) . It's solved my issue. 

 

SaschaWildgrube
ServiceNow Employee
ServiceNow Employee

The DevTools scoped app contains a number of helpful re-useable scripts.

One of them can create database indexes via scripts - e.g. as part of an installation script.

Check it out here:

https://github.com/saschawildgrube/servicenow-devtools/blob/master/update/sys_script_include_55cccc6...

ITSM Dev
Tera Expert

You may receive that error when using Index Creator on the "serial_number" field on alm_hardware because the field is actually not on that table but the parent alm_asset table.

You can get around that by creating the index in the alm_asset table:

  1. Navigate to the table record of the alm_asset table
  2. Scroll to the bottom of the table record (below "Related Links")
  3. Select the "Database Indexes" tab
  4. Click on "New"