--- title: "1569 Using SQL Queries to Search for History or Audit Log in SQL Database" slug: "1569" updated: 2026-02-03T18:39:13Z published: 2026-02-06T14:06:10Z canonical: "documentation.winmagic.com/1569" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.winmagic.com/llms.txt > Use this file to discover all available pages before exploring further. # 1569 Using SQL Queries to Search for History or Audit Log in SQL Database **Topic:** This How-To article provides instructions on how to use SQL queries to search the History Log or Audit Log in the SecureDoc SQL Database. **Supported Product version:** - All SES versions **Environment:** - SQL express and full version of SQL 2008/2012 **Steps to follow:** 1. Please execute the search command for example: **Where Description like '%sesadmin%'**  on these two tables: (The sesadmin account is the admin account (application user account) that executed the commands within the SES Console) 1. dbo.Event_Log 2. dbo.Hist_Event_Log 2. Select the SES database > click on the + button on the “Tables” > right click on i.e. dbo.Event_Log and click on “Select Top 1000 Rows”. 1. ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1569-image-u4nr2b9a.png) 2. ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1569-image-ongmpqq5.png) 3. At the bottom of the table, please enter the following command: **Where Description like ‘%sesadmin%’** ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1569-image-2c9bcinp.png) 1. Highlight the whole line and then click on button Execute 2. Scroll to the lower pane to the right there will be a description and date of the execution. ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1569-image-lhqizze3.png) 1. The same command can be executed for the dbo.Hist_Event_Log