How can i extract report from Sys Audit table along with the Incident records(not the sys id's).

Jayant Balyan1
Tera Contributor

I want to extract report from Sys audit table and compare it with the changes made on Incidents. Sys audit table has sys id for those incidents. How can i extract file/report with the Incident numbers.

Thanks.

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

You need to create a Database view for 

sys_audit & incident table. 

find_real_file.png

Once done you can report on number instead of Document key.

Can you one such need as it is not ideal to report on audit & other tables not because of security but tons of data it holds.

View solution in original post

16 REPLIES 16

Agreed. Not sure if you had gone through the comments before. That is what was suggested. Database view will not create entry it will just show a view & that to on go. Unlinke metirc that creates entries for each transactional record.

find_real_file.png

Still if you create a report on this database view, It will perform the join and query the sys_audit table which will ultimately lead to performance concerns on the reporting. 

In my approach I have mentioned to create a database view only on the incident table and not on the sys_audit table.

@Jayant Balyan - I think you should try both the approaches and see what would suit you best in terms of performance/best practice and then mark the answer as correct so that it will also benefit the future readers of the community.

 

 

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Not sure what is the purpose of creating a database view for one table alone i.e. incident.

That itself defeats the purpose of database view.

It is not about marking an answer correct but what an option that minimizes efforts. As updated had already mentioned it is not ideal to report on audit table.

Hi Jaspal,

To create database view only on Incident table will help to export the sys id's and Incident number from the report as if you create directly report on incident table then you cannot export the sys id and incident number together. 

This is the limitation.

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg