Export the Activity log to Excel

Mohamed Faizel
Giga Expert

Is it possible to export the Incident activity log to excel?

5 REPLIES 5

Michael Kaufman
Giga Guru

It is stored in the sys_audit table, for the table_name of incident. You can make a report for users to export to excel. However, it is a large table and you might need to put some restrictions on the report due to performance concerns.

Mike


Hi Mike,


There is a interesting wiki article here, which expands a little on the performance concerns you mention.



http://wiki.servicenow.com/index.php?title=Reporting_on_System_Tables#gsc.tab=0


1 Overview

System tables are, by default, restricted from the Reporting module. These tables include, but are not limited to:


  • Sys audit [sys_audit]
  • Log [syslog]
  • Transaction Log [syslog_transaction]
  • Attachment [sys_attachment]
  • Email [sys_email]

The reason for this is because Sys audit is typically the largest table in any instance. It is not unusual for the audit table, in even a mid-sized instance, to be several gigabytes. At a large installation, this table can be 50GB or more.When we access the Sys audit table programmatically, we know what our query pattern is going to look like, so we have added appropriate data indexes to match our queries. This means that when you bring up, for example, the history on an incident, the database can use an index to efficiently pull back the few dozen rows it needs for that query.With freeform reporting, however, we cannot predict what your query pattern is going to look like. Maybe you want to group by fieldname, or sort by oldvalue. So it is possible your queries are not going to be indexed queries. The net result is you will be asking the database to table scan a multiple GB file, which is bad for these reasons:


  • It is slow, so your report will take an unacceptably long time
  • While the database is grinding the disk to scan your table, your instance will slow down or even become unavailable because other queries cannot get the resources they need.


Best Regards



Tony


derek_wada
Mega Contributor

Here's an article I recently wrote that you might find valuable:

http://servicenowscholar.com/2012/09/28/searching-for-text-in-the-activity-log/

It adds onto what Mike was saying by explaining how to put this table into a more presentable / readable format (actually using another, very similar table to the sys_audit table).


Derek, the article is not available now.