Job Management Partner 1/Software Distribution Setup Guide

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

7.6.1 Procedure for creating data partitions

The partition size for this example assumes 1,000 clients are being administered, each client collects 2,000 operation monitoring history items per day, and the database is storing eight months of data. In this case, 2 million operating information items are created daily and 40 million items are created monthly (assuming 20 days). Since this means a medium-sized user, we recommend that you create database partitions that can store a month's worth of data.

Organization of this subsection
(1) Estimating the space required for the database
(2) Coding query scripts for creating data partitions
(3) Creating or upgrading a JP1/Software Distribution database
(4) Creating data partitions

(1) Estimating the space required for the database

When creating a new JP1/Software Distribution database, you also need to include in the estimate the space required for devices other than software operation monitoring history database devices. For details, see 5.4.2 Estimating disk space required for Microsoft SQL Server in the manual Description and Planning Guide. Estimate the space required monthly for the software operation monitoring history database devices and for the software operation monitoring history data partitions that hold one month of data. Here, we use 10 for the number of programs for which operating time is acquired.

To change existing JP1/Software Distribution databases to data partitions, also estimate the size of the monthly software operation monitoring history data partition.

Space required for software operation monitoring history database devices
software-operation-monitoring-history-database-device-space-required (bytes)
= (1,861#1 x number-of-software-operation-monitoring-history-information-items)#2
+ (80 x number-of-acquired-operating-time-information-items)#3

Software operation monitoring history data partition space required for one month
software-operation-monitoring-history-data-partition-space-required-for-one-month (bytes)
= (1,861 x number-of-software-operation-monitoring-history-information-items)#2
= 1,861 x 1,000 x 2,000 x 20
= approximately 80 GB

#1
To set the maximum value for operation history information size, specify 1,861 (bytes). To specify a more average software operation monitoring history size, specify 543 (bytes).

#2
number-of-software-operation-monitoring-history-information-items
= number-of-client-machines-subject-to-software-operation-monitoring (1,000)
x number-of-operation-monitoring-history-items-acquired-per-client-daily (2,000)
x days-to-retain-operating-information (as secondary area, 10 days)

#3
number-of-acquired-operating-time-information-items
= 220 x number-of-clients x number-of-programs-subject-to-operating-time-acquisition (10)
= 1,861 x 1,000 x 2,000 x 10 + 80 x 220 x 1,000 x 10
= approximately 40 GB

Therefore, when creating a new JP1/Software Distribution database, create a 40-GB software operation monitoring history database device as a secondary area with Database Manager and create eight 80-GB software operation monitoring history data partitions for eight months of data using SQL Server Management Studio.

To change a JP1/Software Distribution database to a data partition, use the existing software operation monitoring history database device as a secondary area and create eight 80-GB software operation monitoring history data partitions for eight months of data using SQL Server Management Studio.

Here, we assume the following three disks are available for creating the secondary area.

#
Used when creating a new database.

(2) Coding query scripts for creating data partitions

In this subsection, we prepare code query scripts for creating the data partitions.

Table 7-6 Query scripts (when creating data partitions)

No. Query script name Description Sample
1 DropTable.sql Deletes the existing netmdm_monitoring_security table created by Database Manager.
To create your own query script based on this sample, change the following item:
  • Database name in USE statement
F.1
2 AddFilegroup.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.2
3 AddFiletoEdrive.sql Adds an actual file to the E 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.3
4 AddFiletoFdrive.sql Adds an actual file to the F 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.4
5 CreatePartition.sql Creates a partition function (PARTITION FUNCTION) and partition scheme (PARTITION SCHEME).
To create your own query script based on this sample, change the following items:
  • Database name in USE statement
  • yyyymmdd format value of CREATE PARTITION FUNCTION
F.5
6 CreateTable.sql Creates a netmdm_monitoring_security table in the partition scheme.
To create your own query script based on this sample, change the following item:
  • Database name in USE statement
F.6

The data partitions shown in Tables 7-7 and 7-8 will be created when you execute the query scripts listed in Table 7-6.

Table 7-7 Files and filegroups (when creating data partitions)

No. Logical name File name Initial size Upper limit Increase amount Filegroup name
1# NETMDM_MONI_DEVICE D:\Program Files\Hitachi\NETMDB\MSSQL\MONITOR.sdf 40,000 MB UNLIMITED 10% netmdm_moni_seg
2 NETMDM_DP_0001 E:\NETMDP\MONITOR_DP_0001.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0001
3 NETMDM_DP_0002 E:\NETMDP\MONITOR_DP_0002.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0002
4 NETMDM_DP_0003 E:\NETMDP\MONITOR_DP_0003.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0003
5 NETMDM_DP_0004 E:\NETMDP\MONITOR_DP_0004.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0004
6 NETMDM_DP_0005 F:\NETMDP\MONITOR_DP_0005.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0005
7 NETMDM_DP_0006 F:\NETMDP\MONITOR_DP_0006.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0006
8 NETMDM_DP_0007 F:\NETMDP\MONITOR_DP_0007.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0007
9 NETMDM_DP_0008 F:\NETMDP\MONITOR_DP_0008.ndf 80 GB UNLIMITED 10% netmdm_moni_dp_0008

#
These are the initial size, upper limit and increase amount to be specified when creating a new database.

Table 7-8 Partition function name and partition scheme name (when creating data partitions)

Partition function name Partition scheme name
netmdm_monitoring_security_pf netmdm_monitoring_security_ps

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

Table 7-9 Operation monitoring history that is stored (when creating 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

(3) Creating or upgrading a JP1/Software Distribution database

For more information about how to create a new JP1/Software Distribution database, see 7.5.1 Creating a new database. When you create a new database, specify the initial size, upper limit, and increase amount from entry No. 1 in Table 7-7 in the software operation monitoring history database file.

For information about changing an existing JP1/Software Distribution database to a data partition, see 7.5.4 Upgrading the database.

(4) Creating data partitions

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

To create a new JP1/Software Distribution database:

  1. Execute DropTable.sql and delete the existing netmdm_monitoring_security table created by Database Manager.
  2. Execute AddFilegroup.sql to add the filegroup to which the data partition will be assigned.
  3. Create the folder E:\NETMDP.
  4. Execute AddFiletoEdrive.sql, add an actual file to the E drive, and assign it to the filegroup.
  5. Create the folder F:\NETMDP.
  6. Execute AddFiletoFdrive.sql, add an actual file to the F drive, and assign it to the filegroup.
  7. Execute CreatePartition.sql to create the partition function and partition scheme.
  8. Execute CreateTable.sql to create the netmdm_monitoring_security table in the partition scheme.
  9. Using SQL Server Management Studio, right-click the target database name NETMDM_SAMPLE to display the menu, choose Properties, and confirm that File and Filegroup are configured as specified. Also, right-click NETMDM_SAMPLE to display the menu, choose Storage, and confirm that netmdm_monitoring_security_ps (under Partition scheme) and netmdm_monitoring_security_pf (under Partition function) have been created.

To change an existing JP1/Software Distribution database into a data partition:

  1. Stop Remote Install Server service.
  2. Using the bcp utility, batch export the existing data in the netmdm_monitoring_security table.
  3. Execute DropTable.sql to delete the netmdm_monitoring_security table.
  4. Execute AddFilegroup.sql to add the filegroup to which the data partition will be assigned.
  5. Create the folder E:\NETMDP.
  6. Execute AddFiletoEdrive.sql, add an actual file to the E drive, and assign it to the filegroup.
  7. Create the folder F:\NETMDP.
  8. Execute AddFiletoFdrive.sql, add an actual file to the F drive, and assign it to the filegroup.
  9. Execute CreatePartition.sql to create the partition function and partition scheme.
  10. Execute CreateTable.sql to create the netmdm_monitoring_security table in the partition scheme.
  11. Using SQL Server Management Studio, right-click the target database name NETMDM_SAMPLE to display the menu, choose Properties, and confirm that File and Filegroup are configured as specified. Also right-click NETMDM_SAMPLE to display the menu, choose Storage, and confirm that netmdm_monitoring_security_ps (under Partition scheme) and netmdm_monitoring_security_pf (under Partition function) have been created.
  12. Using the bcp utility, batch import the previous security table data.