The CardioLog Enterprise edition stores history data for up to 5 years. To maintain database health, high performance, and free up disk space, we recommend periodically archiving usage data history.

Contents

Archiving Raw Usage Data History

Determine which events (raw data) should be archived. It is recommended to perform this procedure during off-peak hours, typically during the weekend. This process will not affect data collection but it will affect overall performance of the system. You can stop the process at any time and continue it later.

Note: Prior to performing this procedure, create a full backup of the CardioLog database and verify that you have enough free space in the database:

CardioLog Database Transaction Log Disk - 50 GB minimum
Temp Database (tempdb) Disk - 20% of CardioLog Database Data Disk size.
Temp Database Log Disk - 5 GB minimum

  1. Download the archive script.
  2. Edit the archive date (usage data earlier than this date will be archived). You can view the progress in the Messages tab in SQL Management Studio

    set @cuttingDate = '2016-01-01', (date format: YYYY-MM-DD)

  3. Stop the CardioLog Scheduling Service and CardioLog Diagnostics Service.
  4. Execute the script against the CardioLog database.
  5. When the script has completed being executed, shrink the CardioLog database transaction log (The process may take up to a few hours, depending on the amount of data you wish to archive).
  6. Restart the CardioLog Scheduling Service and CardioLog Diagnostics Service.
  7. After executing the archive script, the data will be moved to archive tables (tab_event_log_archive, tab_event_log_users_archive, tab_geo_log_archive, tab_goal_log_archive, tab_goal_test_log_archive, tab_test_log_archive, tab_referrer_log_archive) and will no longer be available in reports. In order to free up disk space copy these tables to backup and then truncate these tables in the CardioLog database.
  8. In order to restore the data from archive, please contact us to receive the un-archive script.

Deleting Raw Usage Data History

Determine which events (raw data) should be deleted permanently. It is recommended to perform this procedure during off-peak hours, typically during the weekend. This process will not affect data collection but it will affect overall performance of the system. You can stop at any time and continue the process later.

Note: Prior to performing this procedure, create a full backup of the CardioLog database and verify that you have enough free space in the database:

CardioLog Database Transaction Log Disk - 50 GB minimum
Temp Database (tempdb) Disk - 20% of CardioLog Database Data Disk size.
Temp Database Log Disk - 5 GB minimum

  1. Download the delete raw data script.
  2. Edit the delete start date and end date (usage data in this date range will be deleted permanently). You can view the progress in the Messages tab in SQL Management Studio.

    @startDate = '2015-01-01', (date format: YYYY-MM-DD)
    @endDate = '2016-01-01', (date format: YYYY-MM-DD)

     
  3. Stop the CardioLog Scheduling Service and CardioLog Diagnostics Service.
  4. Execute the script against the CardioLog database.
  5. When the script has completed being executed, shrink the CardioLog database transaction log (The process may take up to a few hours, depending on the amount of data you wish to archive).
  6. Retart the CardioLog Scheduling Service and CardioLog Diagnostics Service.
  • No labels