Database logging in Dynamics 365 Human Resources and Finance & Operations is a history of actions executed by the system, based on CRUD (Create Update Delete). Database logging is needed to track the specific types of changes to the system. The operations that can be tracked with database logging are: insert, update, delete and rename key.
When we configure the logging for a table or field, a record of every change to that table or field is stored in the database log table called sysdatabaselog, located in the environment database. Database logging can be used to create an auditable record of changes to specific tables that contain sensitive information.
How to setup database logging
1. Go to System administration > Links > Database > Database log setup.
2. Select New.
3. Click Next.
It will show the tables and their field names. If you click on Show all tables and Show table names, then it will display technical names for the tables and fields. You will see something like this:
4. Select Position details and click on Next.
5. Mark the checkbox for Insert, update and delete operation. Click on Next.
6. Finish the wizard.
Once the setup is finished, it will show the desired operations in the setup form.
Now, lets test it
Now we have to create a position and add some information to Position details.
1. Add some data to Position details as listed below and complete the position action.
2. Now, If you go to System Admin > Links > Database log, A new record is created for Insert operation.
3. Go back to the Position and change some details of Position. Complete the Position action.
4. Now, If you go to System Admin > Links > Database log, a new record is created for Update operation.
5. Go back to the Position and delete it.
6. Now, the Position is deleted. Go to System Admin > Links > Database log. A new record is created for Delete operation.
The history of the table can be tracked using Database Log > History tab. It will show the event fired during the Position life cycle.
How to clean up the database logs
Lastly, we will show you how to clean up your database logs.
- Go to System administration > Inquiries > Database > Database log.
- Select Clean up log.
3. The clean-up can be done in a batch or manual depending on data.
4. Once this is done, it will show blank data in Database log form.
In this way we can track the information of sensitive data.
For more information check Microsoft docs. If you have any other questions, feel free to reach out to us via our live chat in the bottom right of your screen. Click here to learn more about our solutions that enhance Dynamics 365 Human Resources.
Leave a Reply