- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 08:03 AM - edited 11-15-2023 08:22 AM
Can you please help me on the below query
Can we create a database view with task & sys_history_line
OR
database view with task & sys_history_set & sys_history_line
I have created as below, however, it is not working due to where clause issue
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 09:44 AM - edited 11-15-2023 09:53 AM
As per the ServiceNow docs, it is not recommended to use history sets for reporting. You can use Audit (sys_audit) table which has the same data as history and history sets tables.
Refer the below links for better understanding:
Check this old thread as well:
If you want to join task table and Audit table, you can do like below:
Regards,
Vasu Ch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 08:33 AM - edited 11-15-2023 08:35 AM
Hi @Naveen Bagula,
Seems like you already created view, Is it working for you or not. Many of operational support team (itil users) is looking for all change/history data from logs, they have option to create metric to support the business need.
Querying over sys_history_set & sys_history_line tables may lead performance issue or long running query without result or session time-out and it required admin access just in case you are planning something for itil users.
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 04:44 PM
Hi @Naveen Bagula ,
Thanks for marking this helpful, so what's final conclusion, are you creating view over system logs tables or not.
-Thanks
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 07:55 PM
Hi Ashish,
Thank you for the quick response and helping on this. I am going with sys_audit & task table for this as it gave me the required result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 09:44 AM - edited 11-15-2023 09:53 AM
As per the ServiceNow docs, it is not recommended to use history sets for reporting. You can use Audit (sys_audit) table which has the same data as history and history sets tables.
Refer the below links for better understanding:
Check this old thread as well:
If you want to join task table and Audit table, you can do like below:
Regards,
Vasu Ch