You are viewing limited content. For full access, please sign in.

Question

Question

Export and Print Event Types in Audit Trail

asked on September 9, 2014

 

 

We are wondering about the LF Audit Trail.  We know event types 32,33 are export and print.

 

We notice that the Audit_Event table has these event types.

 

We are basically trying to find all docs that have had an export or print event.

 

When we try  to join to the audit_entry table.  We do NOT find any associated entries hooking up Audit Event to Audit Entry tables.

 

But for other event types we do.

 

We also notice that we get successful joins to the Audit_page_range when joining to the Audit_Event table via the event id.

 

What we can’t figure out is how to know which document was exported or printed from the Audit Trail database.

 

We are trying to write a SQL Query to provide this information

 

Any ideas?

 

Thanks

Don Hunt

 

1 0

Answer

APPROVED ANSWER
replied on September 9, 2014

Please disregard my previous post. It appears that the sql script used to create a new audit database in 9.1 had a problem which is causing this issue.

 

Presuming that you are using Microsoft SQL as the audit database backend, please go into C:\Program Files\Laserfiche\Audit Trail\SQL and first backup the ms-audit.sql file to another location. Then, edit the existing ms-audit.sql file in that folder using an application such as Notepad.

 

Look for the line

reason_event_type smallint not null,

 

and change that to

reason_event_type smallint DEFAULT 0 not null,

 

Once you've done that, then proceed with deleting/detaching the current Audit Trail database from your SQL instance and then go through the Audit Trail Configuration page to re-create the database. After the date range is set and the audit data is loaded into the new database (that was created using the modified script) please confirm that you can retrieve the entry_id values for the export events.

2 0

Replies

replied on September 9, 2014

You should be able to query the export_events view. It will contain information including the event_id, event_time, event_type, entry_id, name, etc.

 

Do you get any results if you just run

select * from export_events

 

0 0
replied on September 9, 2014

I run the view.  What is interesting is that all the entry_id values are blank for every record in the view.  Which again does not help us know which documents were exported or printed.  Any idea why?

0 0
replied on September 9, 2014

Was your Audit Trail database upgraded from a previous version? If so, what version was it previously on?

 

Also, would it be possible to detach the current Audit Trail database and then using the Audit Trail Configuration web site, create a new Audit Trail database? After the new database is created and the audit date ranges set, the audit data from the Laserfiche Server's binary audit logs should be loaded into the database. Once that's complete, try querying the export_events view again and see if you can see the entry IDs.

0 0
APPROVED ANSWER
replied on September 9, 2014

Please disregard my previous post. It appears that the sql script used to create a new audit database in 9.1 had a problem which is causing this issue.

 

Presuming that you are using Microsoft SQL as the audit database backend, please go into C:\Program Files\Laserfiche\Audit Trail\SQL and first backup the ms-audit.sql file to another location. Then, edit the existing ms-audit.sql file in that folder using an application such as Notepad.

 

Look for the line

reason_event_type smallint not null,

 

and change that to

reason_event_type smallint DEFAULT 0 not null,

 

Once you've done that, then proceed with deleting/detaching the current Audit Trail database from your SQL instance and then go through the Audit Trail Configuration page to re-create the database. After the date range is set and the audit data is loaded into the new database (that was created using the modified script) please confirm that you can retrieve the entry_id values for the export events.

2 0
replied on September 11, 2014

Hi Don, 

 

If your question has been answered, please let us know by clicking the "This answered my question" button on the response.

 

If you still need assistance with this matter, just update this thread. Thanks!

0 0
replied on September 16, 2014

Yes the last answer post did resolve the issue after we dropped and recreated our Laserfiche Audit Trail database after applying the fix above to the script.

Thanks!

0 0
replied on June 26, 2019

Dears , I've same issue with Version 10.2.1.908

The script is correct but entry id column is null.

Please help.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.