Job Management Partner 1/Software Distribution Setup Guide

[Contents][Glossary][Index][Back][Next]

7.6.3 Procedure for reassigning data partitions

If there is no disk available for a new partition, unneeded history must be deleted and an existing data partition must be reassigned. This subsection describes how to delete history up to March 2011 and reassign the data partitions to store history from January through March 2012.

Organization of this subsection
(1) Creating query scripts for reassigning data partitions
(2) Reassigning data partitions

(1) Creating query scripts for reassigning data partitions

In this subsection, we prepare query scripts for reassigning data partitions.

Table 7-13 Query scripts (for reassigning data partitions)

No. Query script name Description Sample
1 CreateArchTable.sql Creates a netmdm_monitoring_security_arch table for transferring deleted data.
To create your own query script based on this sample, change the following item:
  • Database name in USE statement
F.10
2 SwitchPartition.sql Switches history up to March 2011 from the netmdm_monitoring_security table to the netmdm_monitoring_security_arch table.
To create your own query script based on this sample, change the following item:
  • Database name in USE statement
F.11
3 DropArchTable.sql Deletes the netmdm_monitoring_security_arch table.
To create your own query script based on this sample, change the following item:
  • Database name in USE statement
F.12
4 MergeRange.sql Alters the partition function so that history up to March 2011 will be stored in netmdm_moni_seg.
To create your own query script based on this sample, change the following items:
  • Database name in USE statement
  • yyyymmdd format value of ALTER PARTITION FUNCTION
F.13
5 AlterPartition2nd.sql Alters the partition function and partition scheme so that history from January through March 2012 will be stored in the existing filegroup from which history was just deleted.
To create your own query script based on this sample, change the following items:
  • Database name in USE statement
  • yyyymmdd format value of ALTER PARTITION FUNCTION
F.14

Operation monitoring history can be stored as shown in the following table by executing the query scripts of Table 7-13, deleting old history, and altering the partition scheme and partition function.

Table 7-14 Operation monitoring history that is stored (for reassigning data partitions)

No. Filegroup name Partition number Operation monitoring history that is stored
1 netmdm_moni_seg 1 event-start-time < 04/01/2011
2 netmdm_moni_dp_0004 2 04/01/2011 [Figure] event-start-time < 05/01/2011
3 netmdm_moni_dp_0005 3 05/01/2011 [Figure] event-start-time < 06/01/2011
4 netmdm_moni_dp_0006 4 06/01/2011 [Figure] event-start-time < 07/01/2011
5 netmdm_moni_dp_0007 5 07/01/2011 [Figure] event-start-time < 08/01/2011
6 netmdm_moni_dp_0008 6 08/01/2011 [Figure] event-start-time < 09/01/2011
7 netmdm_moni_dp_0009 7 09/01/2011 [Figure] event-start-time < 10/01/2011
8 netmdm_moni_dp_0010 8 10/01/2011 [Figure] event-start-time < 11/01/2011
9 netmdm_moni_dp_0011 9 11/01/2011 [Figure] event-start-time < 12/01/2011
10 netmdm_moni_dp_0012 10 12/01/2011 [Figure] event-start-time < 01/01/2012
11 netmdm_moni_dp_0001 11 01/01/2012 [Figure] event-start-time < 02/01/2012
12 netmdm_moni_dp_0002 12 02/01/2012 [Figure] event-start-time < 03/01/2012
13 netmdm_moni_dp_0003 13 03/01/2012 [Figure] event-start-time

(2) Reassigning data partitions

You can add data partitions by executing the query scripts from Table 7-13 using SQL Server Management Studio.

To re-assign a data partition:

  1. Stop the Remote Install Server service.
  2. Execute CreateArchTable.sql to create the netmdm_monitoring_security_arch table for transferring deleted data.#
  3. Execute SwitchPartition.sql to transfer history up to March 2011 from the netmdm_monitoring_security table to the netmdm_monitoring_security_arch table.#
  4. Execute DropArchTable.sql to delete the netmdm_monitoring_security_arch table.#
  5. Execute MergeRange.sql to alter the partition function so that history up to March 2011 is stored in netmdm_moni_seg.
  6. Execute AlterPartition2nd.sql to alter the partition function and partition scheme so that history from January through March 2012 will be stored in the existing filegroup from which history was just deleted.

#
History can also be deleted using the dcmmonrst command, but deletion takes less time if it is transferred to the netmdm_monitoring_security_arch table and then deleted in table units.