Job Management Partner 1/Software Distribution Setup Guide

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

7.6.2 Procedure for adding data partitions

In the data partition created in 7.6.1 Procedure for creating data partitions, history starting on September 1, 2011 would also be stored in the last partition created for storing eight months of history (partition 9 in Table 7-9). To avoid this, you must add one or more data partitions before storing of history starting on September 1, 2011 begins. This subsection describes the procedure for added new data partitions for storing an additional four months of data.

Organization of this subsection
(1) Estimating the space required for the database
(2) Creating query scripts for adding data partitions
(3) Adding data partitions

(1) Estimating the space required for the database

Here we assume the following disk is available for the new data partitions.

(2) Creating query scripts for adding data partitions

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

Table 7-10 Query scripts (for adding data partitions)

No. Query script name Description Sample
1 AddFilegroup2nd.sql Adds a filegroup to be assigned a data partition.
To create your own query script based on this sample, change the following items:
  • Database name in USE statement
  • Database name in ALTER DATABASE statement
F.7
2 AddFiletoGdrive.sql Adds an actual file to the G drive and assigns it to a filegroup.
To create your own query script based on this sample, change the following items:
  • Database name in USE statement
  • Database name in ALTER DATABASE statement
  • FILENAME specification path in ALTER DATABASE statement
  • SIZE specification size in ALTER DATABASE statement
F.8
3 AlterPartition.sql Changes the function and partition scheme so that history starting on Sep 2011 is stored in the added filegroup.
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.9

The data partitions listed in Table 7-11 will be created when you execute the query scripts shown in Table 7-10.

Table 7-11 File and filegroups (for adding data partitions)

No. Logical name File name Initial size Upper limit Increase amount Filegroup name
1 NETMDM_DP_0009 G:\NETMDP\MONITOR_DP_0009.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0009
2 NETMDM_DP_0010 G:\NETMDP\MONITOR_DP_0010.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0010
3 NETMDM_DP_0011 G:\NETMDP\MONITOR_DP_0011.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0011
4 NETMDM_DP_0012 G:\NETMDP\MONITOR_DP_0012.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0012

Operation monitoring histories are stored by changing the partition function and partition scheme each month for event start times as shown in the following table.

Table 7-12 Operation monitoring history that is stored (for adding data partitions)

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

(3) Adding data partitions

Add data partitions by running the query scripts from Table 7-10 using SQL Server Management Studio.

To add a data partition:

  1. Stop the Remote Install Server service.
  2. Execute AddFilegroup2nd.sql to add the filegroup to which the data partition will be assigned.
  3. Create the folder G:\NETMDP.
  4. Execute AddFiletoGdrive.sql, add an actual file to the G drive, and assign it to the filegroup.
  5. Execute AlterPartition.sql to alter the partition function and partition scheme.#
  6. Using SQL Server Management Studio, right-click on the target database name NETMDM_SAMPLE to display the menu, choose Properties, and confirm that File and Filegroup have been added as specified.

#
If history starting September 1, 2011 has already been stored, it may take some time to execute AlterPartition.sql.