Data Archive in Business Central – Cleanup your data
Cleaning up you data is very important because of the performance of your database and of the size of the database. Especially in Business Central Online with the 80GB database (plus the extra GB’s per user).
In Business Central Wave 2 2021 Microsoft will come with a new extension which calls “Data Archive”. With this extension you can archive your data which is stored in the original tables into a json format in the extension. The json format is stored in table “Data Archive Media Field” in a media field:
The principal is with this function is that when you delete a record in Business Central you can store it in your archive.
If you search for “Data Archive” in Business Central you find it:
Here you can see all the archives that you have created. But here you can export it also to Excel or CSV format:
From here you can start logging all your own deletions and store it in an archive.
In the ribbon just click on “Create new archive”, enter a name of your archive and then click on “Start logging”:
Perform your deletion and then click on “Stop logging” then it will store your deleted record in the archive.
领英推荐
But you can also do it with code.?
This will bind the subscription to the OnDatabaseDelete trigger and all the deletions you do after this will be archived.
Also you can do it with the function SaveRecord() function. An example is shown in the report “Date Compress General Ledger”:
This will be a wonderful new functionality to keep in mind and I think a must if you want to keep your database clean.
The only think is that you sometimes want to view historical data for analyses. I think then you can create an export function to an Azure Cosmos database and analyze it from there.
In this way the data is out of your hot database and stored in a low cost database.
So keep on archiving ??