Reducing the size of databases, backups, and clearing events in U‑PROX

Share and save
Reducing the size of databases, backups, and clearing events in U‑PROX

Review the following utility documents:

Backup Size Considerations

  • The total size of a database backup taken from a live system directly depends on the size and number of the database files.
  • The total size of the backup folder depends on how many daily backups you keep and their individual sizes.
  • You can always manually delete outdated database backups.
  • You may reconfigure the backup folder to reside on another local drive.
  • Large *_log.ldf files can also inflate your backups, though they often compress well.
  • Occasionally, SQL Server will “grow” its transaction logs to enormous sizes—potentially until disk space runs out.
  • To shrink those logs back down, use the specialized SHRINKDATABASE–based utility described in “shrink_DB_modif.pdf.”

Event Log Retention & Cleanup

  • U-PROX stores event data indefinitely in the database.
  • In the U-PROX client menu Action → Settings → Event Log Parameters and “Event Log List,” you’ll find an option for automatic deletion of outdated event logs. This must be enabled and configured:
    • Logs that are inactive (i.e. you have at least two logs and the newest event in a log is older than your specified threshold) can be deleted automatically.
    • Active logs cannot be deleted—neither manually nor automatically.
  • Deleting events from the database does not reduce file size—you must then run the “shrink_DB_modif” utility.
  • By default, the maximum event-log size is set to 1600 MB.
    • In SQL Server Express, the maximum database size is 10 GB, so you should not raise the log-size check above 9000 MB (including SQL Server’s 10% auto‐growth overhead would exceed the 10 GB limit).
    • When a log hits 1600 MB, U-PROX automatically creates the next log file (e.g. UProxIP_01UProxIP_02, …).
  • A complete backup includes the main database (UProxIP.mdf) and all event-log files (UProxIP_01.mdfUProxIP_02.mdf, …).

Automating Old-Backup Cleanup

  1. Download RMBAKscript.zip
    – https://drive.google.com/file/d/1ay8GykshzgDMM2_npRZ7XcNA06huxB9H/view?usp=share_link
  2. Extract it and copy the script folder to C:\script\oldbackup.bat
    • Edit the batch file in a text editor to adjust parameters (it defaults to deleting files older than 60 days C:\ProgramData\A2SoftIn\UProxIP\ C:\ProgramData\ITV\Golden Gate 2002\
  3. Open Task Scheduler (Start → Run → taskschd.msc)
  4. Create a Basic Task named “Remove old DB backup”, set it to run daily at 05:00.

For more on backups and automation, see the U-PROX Q&A at:
https://access.u-prox.systems/uk/putannia/ (see items 4, 5, 6, and 14)

The “Event Log Settings” window

The “List of Event Logs” window

Event Deletion

When you select the specified menu, you can delete events from the system according to the chosen filters and time period.

Events are removed based on the selected parameters, from all existing event-log files.

After the event deletion process, you can run the “shrink_DB_modif.pdf” utility to compress the database files.

Before performing any deletion actions:

– Make a backup copy of the databases.

You may also like