Managing Log Size

Managing the log size is only necessary if you have enabled the repository log, see
Repository log.
To reduce the log size, you can:
• delete all the log commands earlier than a selected date
• (SQL Server) select and delete log elements, earlier than a selected date
• modify MetaClass loggability
Log size management frequency
You must reduce the log size:
• every month, for configurations of less than 50 users.
• every week, for configurations of more than 50 users.
Deleting a log or reducing the log size
Prerequisite: before deleting your log (complete or partial deletion), MEGA recommends that you back up it.
To delete a log or to reduce its size:
1. Connect to HOPEX Administration and select the repository concerned.
2. Right-click the repository and select Repository Log > Manage Repository and Object Log.
The Manage Log window opens.
3. Define the commands to be deleted:
• All commands or
• Commands earlier than the date you select using the drop-down menu calendar.
4. Click Delete to delete all the commands contained within the selected time interval.
Backing up the repository log
To back up the repository log you have to export the repository log in a file and save it.
This file can be exported in:
• logfile text (.mgl).
Name format of the exported file is "LOGmmdd.mgl", where "mmdd" represents logfile export date month and day.
• XML MEGA (.xmg)
The exported file is in the form of an XML file containing commands or data (objects and links).
To avoid backup duplications and save backup time and size, select Commands from “selected date” to “selected date” and select a starting date corresponding to the end date of your last backup, and select the ending date you require.
To backup the repository log in the form of command file:
1. Connect to HOPEX Administration and select the repository concerned.
2. Right-click the repository and select Repository Log > Export.
The Export repository log dialog box opens.
3. Select export format.
4. (If needed) By default the file is saved in
<environment folder>\db\<repository name>\WORK folder. Modify the default name and folder to save the export file. The
Browse button

allows you to browse the folder tree and select the folder in which the file will be saved.
5. In the Data type pane, select the type of exported modifications:
• Metamodel: to extract the metamodel from the system repository. This is useful if the standard metamodel has been modified.
• Technical Data: to export, from the system repository, the changes made to data such as descriptors and queries.
• Data: to export changes made to repository data, particularly the workspaces.
• Temporary Objects - these objects are created when executing requests, consulting objects (stored in the history), etc. Usually you do not need to export these objects.
6. To export the commands that correspond to a defined period only, select Commands from / to and specify the relevant dates.
7. Click Export.
The Execution Report appears.
8. Click OK.
The file is exported and saved in the specified folder.
Deleting log elements to reduce the log size
You can delete log elements more specifically: you can delete only log elements relating to specific MetaClasses, earlier than a selected date.
To delete log elements regarding specific MetaClasses:
1. Connect to HOPEX Administration and select the repository concerned.
2. Right-click the repository and select Repository Log > Manage Repository and Object Log.
The Manage Log dialog box opens.
3. Click Advanced.
The Log Management - Advanced window shows the log element number by MetaClass and specifies the first and last creation date.
4. In the Display at the date pane, select the date until which you want to delete the log elements.
5. Click Refresh.
The Number until the date column shows for each MetaClass the log element number until the selected date.

Click the
Number until the date column header to sort the MetaClasses, with the most populated at the top.
6. In the MetaClass column, select the MetaClass for which you want to delete the log elements until the selected date.

You can select several MetaClasses.
7. Click Delete.
Log elements are deleted.
Modifying MetaClass loggability
To reduce the number of objects generated in logs, you can modify logging of MetaClasses you do not want to track.
To modify MetaClass loggability:
1. Connect to HOPEX.
2. Open the MetaStudio navigation window and expand folders MetaClass > MetaModel.

Alternative: click
Explore 
and use explorer to find the
MetaClass or
MetaAssociation object.
3. Open the properties dialog box of a MetaClass or MetaAssociation.
4. In the Characteristics > Advanced tab, for the loggability attribute, select "Unloggable" value.
Occurrences created, updated or deleted in a private workspace are dispatched, but certain commands are not available in object histories or in repository activity.