
28
Principled Technologies, Inc.: Dell PowerVault MD3000i high-availability testing on
Windows Server 2008 R2 and Hyper-V
On the command line for the ds2_create_orders.c module, we specified the size. The available options were S
(small), M (medium), and L (large). We added the case W for the 250GB database. In the switch statement that
sets the values for the variables max_cust_id and max_prod_id, we added cases that assigned them the proper
values for the 250GB database size.
We recompiled the ds2_create_orders.c module on Linux, following the instructions in the header comments. We
used the following command line: gcc –o ds2_create_orders ds2_create_orders.c –lm
Editing the ds2_create_cust.c module
We had to make the same changes to the ds2_create_cust.c module that we made to the ds2_create_orders.c
module. On the command line for the ds2_create_cust.c module, we specified the size. The available options
were S (small), M (medium), and L (large). We added the case W for the 250GB database. In the switch
statement that sets the values for the variables max_cust_id and max_prod_id, we added cases that assigned
them the proper values for the 250GB database size.
We recompiled the ds2_create_cust.c module on Linux, following the instructions in the header comments. We
used the following command line: gcc –o ds2_create_cust ds2_create_cust.c –lm
Generating the data for the 20GB database
We used shell scripts to run all four of the executables that generate the data. The distribution did not include
shell scripts for the 250GB size. We wrote shell scripts based on the ds2_create_cust_large.sh and
ds2_create_orders_large.sh scripts. The ds2_create_prod and ds2_create_inv executables did not ship with
associated shell scripts, so we created shell scripts using the instructions in the readme files. We ran the shell
scripts in the following order to generate the data for the 250GB database:
• ds2_create_orders_20gb.sh
• ds2_create_inv_20gb.sh
• ds2_create_prod_20gb.sh
• ds2_create_cust_20gb.sh
We waited until the processes finished before we moved onto the next step.
Creating the database
We modified the database creation SQL Server scripts included in the DVD Store distribution package to build the
database schema, which includes the file structure, tables, indices, stored procedures, triggers, and so on. We
built a master copy of the 250GB database version for SQL Server 2008, and then used that master copy to
restore our test database to the test server between each test run.
We followed these steps to create the database:
1. We created the database and file structure using database creation scripts provided with DS2. We made
size modifications specific to our 250GB database and the appropriate changes to drive letters.
2. We created database tables, stored procedures, and objects.
3. We set the database recovery model to bulk-logged to prevent excess logging.
4. We loaded the generated data. For data loading, we used the import wizard in SQL Server Management
Studio. Where necessary, we retained options from the original scripts, such as “Enable Identity Insert.”
5. We created indices, full-text catalogs, primary keys, and foreign keys using the database-creation scripts.
6. We updated statistics on each table according to database-creation scripts, which sample 18 percent of
the table data.
7. We created ds2user SQL Server login and user for testing.
8. We set the database recovery model back to full.
We made the following several changes in the build scripts:
• Because we varied the size of the datasets, we sized the files in our scripts to reflect the database size
and the number of files per filegroup. We allowed for approximately 40 percent free space in our
database files to ensure that filegrowth activity did not occur during the testing.
Komentarze do niniejszej Instrukcji