KB ID: | 4175 |
Product: | Veeam ONE 11, Veeam ONE 10a |
Challenge
Cause
However, Veeam ONE instances that are upgraded from the older versions (8.x, 9.x) do not have database partitioning automatically applied. For such databases, you can apply the partitioning manually.
Solution
Partitioning for version 10 and newer is based on splitting the monitor.PerfSampleMed, monitor.PerfSampleDay, monitor.PerfSampleLow tables into numbered items joined into views.
When the partitioning is applied, the "monitor.PerfSampleMed" table is replaced with a database view "monitor.PerfSampleMed" which contains a set of the numbered tables:
monitor.PerfSampleMed0
monitor.PerfSampleMed1
monitor.PerfSampleMed2
...
monitor.PerfSampleMed7
monitor.PerfSampleMed8
Tables "monitor.PerfSampleDay" and "monitor.PerfSampleLow" are split equally, but with a different number of items.
To apply the database partitioning to Veeam ONE version 10 (or newer), do the following:
- Stop Veeam ONE services and create a backup of the Veeam ONE database. For details, see https://www.veeam.com/kb2356.
- Download the SQL script (DOWNLOAD).
- Execute the script against the Veeam ONE database to deploy the necessary procedures to the database.
- Activate the partitioning process by executing the following SQL commands:
EXEC monitor.sp_convert_perf_table 'PerfSampleMed', 604800, 86400 DECLARE @RetentionPolicyPeriod_Sec bigint = (select top 1 coalesce(RetentionPolicyPeriod,12) from common.ServerSettings)*2629746 EXEC monitor.sp_convert_perf_table 'PerfSampleDay', @RetentionPolicyPeriod_Sec, 2678400 EXEC monitor.sp_convert_perf_table 'PerfSampleLow', @RetentionPolicyPeriod_Sec, 2678400
The process will take some time depending on the database size. You can see the progress of applying the partitioning in the SQL Studio "Messages" panel.
When the process is complete, all three tables will be partitioned and ready to use.