> For the complete documentation index, see [llms.txt](https://docs.videc.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videc.de/june5-3.7/en/zusaetze/audit-trail.md).

# Audit Trail

Audit trail information is automatically activated in the GxP Edition and is logged. With the audit trail, users have the ability to retrieve the following data in an event object in the form of a table:

* Login operations (login, logout, and login attempts)
* Runtime changes to the system (e.g., starting and stopping the JUNE5 server)
* Configuration changes to objects (CRUD operations such as Create, Update, and Delete)
* Configuration changes to data sources

## Net Data Information

Internally, JUNE5 generates net data for the audit trail.

| ID             | Type                      | Description                                                         |
| -------------- | ------------------------- | ------------------------------------------------------------------- |
| HistoryCreated | datetime2 (7) NOT NULL    | Creation time of the audit entry at the source                      |
| HistoryGetIn   | datetime2 (7) NOT NULL    | Creation time of the audit entry in the database                    |
| AuditUid       | uniqueidentifier NOT NULL | Audit UID                                                           |
| Action         | nvarchar (max) NULL       | Action such as CREATE, UPDATE, DELETE, Login, Logout, Start, Stop   |
| Category       | int NOT NULL              | 1 = Administrative, 2 Operational                                   |
| Owner          | nvarchar (max) NULL       | User who created the entry (e.g., Admin, User123)                   |
| OwnerType      | nvarchar (max) NULL       | Service that created the entry (e.g., User, Service)                |
| ObjectName     | nvarchar (max) NULL       | Object name, e.g. Chart123, T234                                    |
| ObjectUid      | uniqueidentifier NULL     | Object UID, unique ID e.g. eed1cfb4-80e5..                          |
| ObjectType     | nvarchar (max) NULL       | Object type, e.g. Chart, Dashboard                                  |
| PropertyName   | nvarchar (max) NULL       | Property name, e.g. Name, Port, Color                               |
| PropertyType   | nvarchar (max) NULL       | Property type, e.g. String, Int, Long, Color, ...                   |
| OldValue       | nvarchar (max) NULL       | Old value                                                           |
| NewValue       | nvarchar (max) NULL       | New value                                                           |
| Information    | nvarchar (max) NULL       | Additional information, e.g. OK, Failed, Description, Message, etc. |

All net data is stored in the AuditTrail table.

## Mapping

Mapping is required to make net data readable. There are different perspectives here.

#### A = Auditor

View of the person who wants to see the audit trail and understands the concepts of an audit trail.

#### B = Event Column ID from JUNE5

Corresponds to the unique ID from the event definition. This definition is fixed in JUNE5. See ["Event Definition"](/june5-3.7/en/datenquellenunterstuetzung-und-einbindung/microsoft-ole-db/sql-tabelle-ereignisse.md) in the JUNE5 manual.

#### C = Audit Table

The columns from the aforementioned audit trail table.

The columns required for the audit trail are summarized as:

| <p>A</p><p>Auditor terms</p> | <p>B</p><p>Definition JUNE5 event table</p> | <p>C</p><p>Audit table in JUNE5 database</p>                  |
| ---------------------------- | ------------------------------------------- | ------------------------------------------------------------- |
| Timestamp                    | TimestampFrom                               | HistoryCreated                                                |
| Category                     | Category                                    | Category                                                      |
| User ID                      | UserName                                    | Owner + OwnerType                                             |
| Activity                     | Status                                      | Action                                                        |
| Parameter ID                 | ItemName                                    | ObjectName + ObjectType                                       |
| Old value, New value, Info   | ItemDescription                             | <p>PropertyName + OldValue +</p><p>NewValue + Information</p> |

In the JUNE5 database, a view named "ViewAudit" is generated for the auditor via a view.

## Audit Trail Configuration

Audit trail configuration is done in *three* steps:

1. Create OLE DB endpoint
2. Configure the data source
3. Event configuration

### Step 1 - OLE DB Endpoint

* Change the identification to *"Audit"*
* Change the name to *"Audit"*
* Change the database instance name to *"localhost\JUNE5PORTAL2022"*
* Enable *"Windows Integrated Security"*
* Save the changes and then test the connection

![](/files/Srk27r5H68qQqpnQGHBu)

### Step 2 - Configure the Data Source

Go to Configure Data Sources and select the *"Audit"* data source.

* Change the identification to *"SQLAudit"*
* Change the name to *"SQL Audit"*
* Go to *"Event Configuration"*

![](/files/MuGhnWjzNSqMCX8kRlRS)

### Step 3 - Event Configuration

Create an event configuration in JUNE5 so that audit information from the "ViewAudit" view can be displayed in a JUNE5 event object.

* Enable the checkbox "Column names are determined by..."
* Enter the SQL command "SELECT \* FROM ViewAudit" in "SQL Event Command"
* Press the "Determine Column Names" button
* Now set the column names as shown in the screenshot

![](/files/yP9cScJuLFpZYNlTCdwp)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.videc.de/june5-3.7/en/zusaetze/audit-trail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
