Operating System
The 64 bit version of the minimal install of Centos 6.5 is used for the Rep Attack operating system. This is a minimal install with no X Windows software or graphical user interface. The ISO image used for the install can be found by following the links on the Centos isoredirect page.
Oracle Express Edition
Oracle Express Edition has already been installed via it's RPM package using all default values.
An additional tablespace called REPOE_DATA has been added to hold the application data used by Rep Attack.
It can be downloaded from the Oracle Database Express Edition 11g Release 2 downloads page. It requires you to sign up for a (free) Oracle Account if you don't already have one.
Oracle Databases
Each machine has the default Oracle XE database installed it it's default configuration. The default database installed with Oracle XE always has the ORACLE_SID of XE but to make it less confusing between the source and target databases, two TNS alias have been set up in the tnsnames.ora files of both the source and target machines.
source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = source)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) ) target = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = target)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) )
If you want to use these tns entries on your host machine to connect to the databases, you will have to place source and target entries into the hosts file on the host machine or replace the hostnames with the hardcoded IP addresses.
SwingBench
SwingBench is a free load generator and benchmark utility designed by Dominic Giles to stress test an Oracle database (10g,11g,12c). Rep Attack uses SwingBench to generate test data and provide a transaction load for the Dbvisit Replicate.
REPOE Schema
Table Size and Row Count
The data in the tables has been randomly generated by the SwingBench using the oewizard command with the following arguments.
oewizard -cl -create -cs //source-int/orcl -scale 0.5 -u repoe -p repoe -ts users -tc 7 -v -dba system -dbap manager
The data in the tables has been automatically generated so it may look a little strange.
Table Name | Initial Row Count | Initial Size (Mb) |
---|---|---|
CUSTOMERS | 500,000 | 72 |
ADDRESSES | 750,000 | 72 |
CARD_DETAILS | 750,000 | 40 |
ORDERS | 714,895 | 80 |
ORDER_ITEMS | 6,674,106 | 144 |
PRODUCT_INFORMATION | 1,000 | 0.25 |
PRODUCT_DESCRIPTIONS | 1,000 | 0.32 |
INVENTORIES | 900,131 | 176 |
WAREHOUSES | 1,000 | 0.06 |
LOGON | 1,191,492 | 32 |
ORDERENTRY_METADATA | 4 | 0.06 |
The total data size (table segments) of the 11 tables is 616 Mb while there are 27 indexes totalling 351Mb. All tables and indexes reside in the REPOE_DATA tablespace.
Note that the maximum amount of user data in an Oracle XE 11g database cannot exceed 11 Gb. If the user data grows beyond this limit, then an ORA-12592 error will appear.
Indexes
There are 27 indexes across the 11 tables totalling 351Mb in size, including one function based index CUST_UPPER_NAME_IX on the CUSTOMERS table, and eight REVERSE key indexes.
Sequences
There are 5 sequences in the schema named ADDRESS_SEQ, CARD_DETAILS_SEQ, CUSTOMER_SEQ, LOGON_SEQ, and ORDERS_SEQ that are used by their respective tables' primary key fields.
Views
There are two views in the schema. PRODUCT_PRICES and PRODUCTS.
Stored Procedures
There is one stored procedure, a package called ORDERENTRY which is used to generate transaction activity against the tables.
Constraints
The schema has 4 DEFERRABLE check constraints. Deferrable constraints have a bearing on data loading and what is rolled back in the event of an error.
Helper Scripts
A couple of helper scripts have been included with the virtual machines to assist you with running the SwingBench transaction generator and determining the records counts between the source and target schemas.
record_count.bash
In the $HOME/replicate directory of the oracle user on the source machine is a script called record_count.bash. This script performs a row count from all the tables in the REPOE schema from both the source and target databases.
It also computes the total of all orders in the ORDERS table. This script is useful as a high level audit of the status of the replication.
For example:
[oracle@source replicate]$ ./record_count.bash TABLE_NAME SOURCE DB TARGET DB ------------------------------ ----------- ----------- ADDRESSES 750000 *No Table* CARD_DETAILS 750000 *No Table* CUSTOMERS 500000 *No Table* INVENTORIES 900131 *No Table* LOGON 1191492 *No Table* ORDERENTRY_METADATA 4 *No Table* ORDERS 714895 *No Table* ORDER_ITEMS 2143687 *No Table* PRODUCT_DESCRIPTIONS 1000 *No Table* PRODUCT_INFORMATION 1000 *No Table* WAREHOUSES 1000 *No Table* 11 rows selected. Sum of orders SOURCE DB TARGET DB ------------- ------------------ ------------------ ORDERS $3,572,944,731.00 $.00 [oracle@source replicate]$
run_swingbench.bash
Sounds funny, but the Rep Attack machines don't come with Dbvisit Replicate installed! The first exercise after you have the source and target machines running is to install Replicate.
0 Comments