Monday, March 28, 2011

Handy ORACLE commands

Some useful commands(source: http://www.vttoth.com/oracle.htm , http://www.orafaq.com/wiki/Oracle_database_FAQ, and the internet ;-)
Oracle version: select * from v$version;
To start a session as sysdba: sqlplus sys@tnsname as sysdba;
To start a sysdba session: sqlplus /as sysdba
To generate an AWR report: SQL>@$ORACLE_HOME/rdbms/admin/awrrpt.sql
Show current database: SELECT * FROM global_name;
Show current database: SELECT name FROM v$database;
Show spfile location: show parameter spfile;
Check database block size: select value from v$parameter where name = 'db_block_size';
Database size: select sum(bytes)/1024/1024 "Meg" from v$datafile;
Redo log size: select l.bytes/1024/1024 "Meg",g.member from v$log l,v$logfile g where l.group# = g.group#;
Check whether or not the database is in archivelog mode: select log_mode from v$database;
Temp file size total: select nvl(sum(bytes),0)/1024/1024 "Meg" from dba_temp_files;
List datafiles: select name from v$datafile;
List control files: select name from v$controlfile;
List redo log files: select member from v$logfile;
Tablespaces to which the datafiles belong: select file_name, tablespace_name from dba_data_files;
Tablespace status, and it's block size: select tablespace_name, block_size, status from dba_tablespaces;
Table info: select owner, table_name, tablespace_name, blocks,NUM_ROWS from all_tables where table_name='your_table_name';
To list all tables in current schema: SELECT table_name FROM user_tables;
or, all tables current user has access to: SELECT table_name FROM all_tables;
To list all schemas: SELECT username FROM all_users ORDER BY username;
To turn pause on: SET PAUSE ON;
To list top n rows of a table in order: SELECT * FROM (SELECT * FROM t ORDER BY c) WHERE ROWNUM <=
n;
Use database: CONNECT schema/password@tnsname;
Show who I am: SHOW USER;
Describe table: DESC tablename;
Set display rows: SET PAGESIZE 66;
Read field constraints: SELECT constraint_name,search_condition FROM
user_constraints WHERE table_name='tablename';
Who owns a table and what tablespace it is in: select owner, table_name, tablespace_name from dba_tables where table_name='CUSTOMERS';
Copy table from foreign host to here: COPY FROM user@tnsname CREATE tablename
USING SELECT * FROM tablename;
Start SQLPLUS without login: SQLPLUS /NOLOG
Change a user's password: ALTER USER user IDENTIFIED BY password;
Unlock an account ALTER USER user ACCOUNT UNLOCK;
ASM ALLOCATION UNIT SIZE select name, allocation_unit_size from v$asm_diskgroup;
ASM Disk Group Size SELECT name, type, total_mb, free_mb,usable_file_mb FROM V$ASM_DISKGROUP;

Cleaning Oracle ASM disk headers


I wanted to create a new ASM diskgroup using asmca, so I started asmca as user oracle.

When asmca was up i could not see the disks that were available as CANDIDATES




The Header Status on some of the  disks were FORMER and MEMBER. From the Oracle docs
Per-instance status of the disk as seen by discovery:
  • UNKNOWN - Automatic Storage Management disk header has not been read
  • CANDIDATE - Disk is not part of a disk group and may be added to a disk group with the ALTER DISKGROUP statement
  • INCOMPATIBLE - Version number in the disk header is not compatible with the Automatic Storage Management software version
  • PROVISIONED - Disk is not part of a disk group and may be added to a disk group with the ALTER DISKGROUP statement. The PROVISIONED header status is different from the CANDIDATE header status in that PROVISIONED implies that an additional platform-specific action has been taken by an administrator to make the disk available for Automatic Storage Management.
  • MEMBER - Disk is a member of an existing disk group. No attempt should be made to add the disk to a different disk group. The ALTER DISKGROUP statement will reject such an addition unless overridden with the FORCE option.
  • FORMER - Disk was once part of a disk group but has been dropped cleanly from the group. It may be added to a new disk group with the ALTER DISKGROUP statement.
  • CONFLICT - Automatic Storage Management disk was not mounted due to a conflict
  • FOREIGN - Disk contains data created by an Oracle product other than ASM. This includes datafiles, logfiles, and OCR disks.


    It's good to clean the ASM disk headers if the disks have been used before, and you want to start fresh. I did the following to clean the disk headers on three of the disks that I planned to use for the diskgroup.



    isvp18> dd if=/dev/zero bs=8k count=1000 of=/dev/rhdisk12
    1000+0 records in.
    1000+0 records out.
    isvp18> dd if=/dev/zero bs=8k count=1000 of=/dev/rhdisk11
    1000+0 records in.
    1000+0 records out.
    isvp18> dd if=/dev/zero bs=8k count=1000 of=/dev/rhdisk13
    1000+0 records in.
    1000+0 records out.




After that my disk were available to asmca as candidates.

 


Wednesday, March 23, 2011

Preparing the Storwize V7000 storage volumes to install Oracle ASM

I wanted to create a single standalone Oracle database on ASM. The storage attached to my AIX host is Storwize V7000.

I had created three volumes on the V7000, and had mounted files systems on them. Now, I want to re-use those volumes on have ASM on them. and re-create the database.

Here is how things looked when I began:


isvp17> lspv
hdisk0          00f65d51a5aa3cf1                    rootvg          active
hdisk1          00f65d51bfba4e2e                    test1           active
hdisk2          00f65d5108ff9043                    test2           active
hdisk3          00f65d5108ffefb6                    test3           active
hdisk4          00f65d51c465f8eb                    metro           active
hdisk5          00f65d51cdf2c48c                    swap            active
hdisk6          00f65d514519e449                    gm_test1        active
hdisk7          00f65d51451a1693                    gm_test2        active
hdisk8          00f65d51451a4067                    gm_test3        active
isvp17>
isvp17> df -m
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4       10240.00   2556.56   76%    52314     9% /
/dev/hd2       16896.00  14396.23   15%    44361     2% /usr
/dev/hd9var     5120.00   4813.32    6%     5785     1% /var
/dev/hd3        3584.00   2527.33   30%     1786     1% /tmp
/dev/hd1       15360.00   1894.61   88%     5963     2% /home
/dev/hd11admin    256.00    255.61    1%        5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt    5120.00   4935.14    4%     7015     1% /opt
/dev/livedump    256.00    255.64    1%        4     1% /var/adm/ras/livedump
/dev/lv00       9440.00   4976.29   48%       83     1% /home/test
vanhalen:/vanhalen/tools    512.00    486.43    5%      541     1% /testlab/tools
nimble:/71aix  30208.00  25331.73   17%     1334     1% /mnt
/dev/lv04       9440.00   4477.18   53%       31     1% /gm_oradata
/dev/lv05       9440.00   8986.10    5%       22     1% /gm_oralog
/dev/lv06       9440.00   9128.91    4%       20     1% /gm_oraarch
isvp17>


I unmounted the file systems /gm_oradata, /gm_oralog. and /gm_oraarch which were using the three V7000 volumes. Next, I tried to run the chdev command to clear the disks.


isvp17> chdev -l hdisk6 -a pv=clear
Method error (/etc/methods/chgdisk):
        0514-062 Cannot perform the requested function because the
                 specified device is busy.
     pv

isvp17> varyoffvg gm_test1
isvp17> varyoffvg gm_test2
isvp17> varyoffvg gm_test3
isvp17> lspv
hdisk0          00f65d51a5aa3cf1                    rootvg          active
hdisk1          00f65d51bfba4e2e                    test1           active
hdisk2          00f65d5108ff9043                    test2           active
hdisk3          00f65d5108ffefb6                    test3           active
hdisk4          00f65d51c465f8eb                    metro           active
hdisk5          00f65d51cdf2c48c                    swap            active
hdisk6          00f65d514519e449                    gm_test1
hdisk7          00f65d51451a1693                    gm_test2
hdisk8          00f65d51451a4067                    gm_test3
isvp17>
isvp17> chdev -l hdisk6 -a pv=clear
hdisk6 changed
isvp17> chdev -l hdisk7 -a pv=clear
hdisk7 changed
isvp17> chdev -l hdisk8 -a pv=clear
hdisk8 changed
isvp17> lspv
hdisk0          00f65d51a5aa3cf1                    rootvg          active
hdisk1          00f65d51bfba4e2e                    test1           active
hdisk2          00f65d5108ff9043                    test2           active
hdisk3          00f65d5108ffefb6                    test3           active
hdisk4          00f65d51c465f8eb                    metro           active
hdisk5          00f65d51cdf2c48c                    swap            active
hdisk6          none                                None
hdisk7          none                                None
hdisk8          none                                None
isvp17>

isvp17> ls -l /dev/rhdisk6
crw-------    1 root     system       18,  6 Mar 21 10:47 /dev/rhdisk6
isvp17> ls -l /dev/rhdisk7
crw-------    1 root     system       18,  8 Mar 21 10:48 /dev/rhdisk7
isvp17> ls -l /dev/rhdisk8
crw-------    1 root     system       18,  7 Mar 21 10:48 /dev/rhdisk8
isvp17>


Changing the ownership of the disk to oracle and group to dba


isvp17> chown oracle:dba /dev/rhdisk6
isvp17> chown oracle:dba /dev/rhdisk7
isvp17> chown oracle:dba /dev/rhdisk8
isvp17> ls -l /dev/rhdisk6
crw-------    1 oracle   dba          18,  6 Mar 21 10:47 /dev/rhdisk6
isvp17> ls -l /dev/rhdisk7
crw-------    1 oracle   dba          18,  8 Mar 21 10:48 /dev/rhdisk7
isvp17> ls -l /dev/rhdisk8
crw-------    1 oracle   dba          18,  7 Mar 21 10:48 /dev/rhdisk8
isvp17>


The volumes/disks are now ready for creation of an ASM diskgroup.

Tuesday, March 22, 2011

Startup and shutdown of Oracle ASM

 # cat /etc/group
asmadmin:!:6000:oracle

$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/grid
$ echo $ORACLE_SID
+ASM


Starting an ASM instance(as user oracle):
$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 21 22:42:18 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> startup;
ORA-01031: insufficient privileges
SQL> connect sys as sysasm
Enter password:
Connected to an idle instance.
SQL> startup;
ASM instance started

Total System Global Area  283930624 bytes
Fixed Size                  2206088 bytes
Variable Size             256558712 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL>

isvp18> ps -ef | grep -i asm
  oracle  7274562        1   0 22:44:17      -  0:00 asm_rbal_+ASM
  oracle  8126534        1   0 22:44:17      -  0:00 asm_mmnl_+ASM
  oracle  8913064        1   0 22:44:17      -  0:00 asm_smon_+ASM
  oracle  8978618        1   0 22:44:17      -  0:00 asm_ckpt_+ASM
  oracle  9765052        1   0 22:44:16      -  0:00 asm_diag_+ASM
    root  9830508 13172966   0 22:49:51  pts/2  0:00 grep -i -i asm
  oracle 10027226        1   0 22:44:16      -  0:00 asm_gen0_+ASM
  oracle 10289252        1   0 22:44:17      -  0:00 asm_mmon_+ASM
  oracle 10748040 16253002   0 22:43:47      -  0:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  oracle 10813538        1   0 22:44:17      -  0:00 asm_mman_+ASM
  oracle 10879092        1   0 22:44:16      -  0:00 asm_pmon_+ASM
  oracle 11010134        1   0 22:44:17      -  0:00 asm_dbw0_+ASM
  oracle 11075668        1   0 22:44:17      -  0:00 asm_dia0_+ASM
  oracle 13304010 16253002   0 22:44:24      -  0:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  oracle 13828280        1   0 22:44:16      -  0:00 asm_psp0_+ASM
  oracle 14483708        1   0 22:44:17      -  0:00 asm_gmon_+ASM
  oracle 14549092        1   0 22:44:16      -  0:00 asm_vktm_+ASM
  oracle 24444936        1   0 22:44:17      -  0:00 asm_lgwr_+ASM
isvp18>



Shutdown of ASM instance(as user oracle):

$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 21 22:37:34 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> connect sys as sysasm
Enter password:
Connected.
SQL> shutdown;
ASM diskgroups dismounted
ASM instance shutdown
SQL>


Monday, March 21, 2011

Creating a single instace Oracle database using ASM on AIX 7.1 using dbca

After installing and configuring Oracle Grid Infrastructure, next I wanted to create an Oracle database using the ASM disk group that I had created.

As user oracle I ran dbca









Installing Oracle Grid Infrastructure 11g R2 on AIX 7.1


I wanted to use Oracle ASM for holding the database files in a single instance Oracle database, so I downloaded the oracle binaries from the oracle download site.

After downloading and unzipping aix.ppc64_11gR2_grid.zip into the home directory of user oracle, I unzipped it which created the grid directory with the binaries.

cd onto the grid directory and run the rootpre.sh script as root, after that run the runInstaller as user oracle.



 As you see there are no candidate disks available. This is cause I had not done anything on the AIX host side to the volumes(LUNS) that I had presented from the V7000 Storage Array


I had created filesystems on the LUNs that were presented from the V7000 storage array to the AIX host.
This is how thing look currently:


isvp17> lspv
hdisk0          00f65d51a5aa3cf1                    rootvg          active
hdisk1          00f65d51bfba4e2e                    test1           active
hdisk2          00f65d5108ff9043                    test2           active
hdisk3          00f65d5108ffefb6                    test3           active
hdisk4          00f65d51c465f8eb                    metro           active
hdisk5          00f65d51cdf2c48c                    swap            active
hdisk6          00f65d514519e449                    gm_test1        active
hdisk7          00f65d51451a1693                    gm_test2        active
hdisk8          00f65d51451a4067                    gm_test3        active
isvp17>
isvp17> df -m
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4       10240.00   2556.56   76%    52314     9% /
/dev/hd2       16896.00  14396.23   15%    44361     2% /usr
/dev/hd9var     5120.00   4813.32    6%     5785     1% /var
/dev/hd3        3584.00   2527.33   30%     1786     1% /tmp
/dev/hd1       15360.00   1894.61   88%     5963     2% /home
/dev/hd11admin    256.00    255.61    1%        5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt    5120.00   4935.14    4%     7015     1% /opt
/dev/livedump    256.00    255.64    1%        4     1% /var/adm/ras/livedump
/dev/lv00       9440.00   4976.29   48%       83     1% /home/test
vanhalen:/vanhalen/tools    512.00    486.43    5%      541     1% /testlab/tools
nimble:/71aix  30208.00  25331.73   17%     1334     1% /mnt
/dev/lv04       9440.00   4477.18   53%       31     1% /gm_oradata
/dev/lv05       9440.00   8986.10    5%       22     1% /gm_oralog
/dev/lv06       9440.00   9128.91    4%       20     1% /gm_oraarch





 I plan on unmounting the filesystems and using the LUNs to create ASM disk groups. So the first thing is to unmount all the file systems.

Next I did the following on the AIX host.



isvp17> varyoffvg gm_test1
isvp17> varyoffvg gm_test2
isvp17> varyoffvg gm_test3
isvp17> lspv
hdisk0          00f65d51a5aa3cf1                    rootvg          active
hdisk1          00f65d51bfba4e2e                    test1           active
hdisk2          00f65d5108ff9043                    test2           active
hdisk3          00f65d5108ffefb6                    test3           active
hdisk4          00f65d51c465f8eb                    metro           active
hdisk5          00f65d51cdf2c48c                    swap            active
hdisk6          00f65d514519e449                    gm_test1
hdisk7          00f65d51451a1693                    gm_test2
hdisk8          00f65d51451a4067                    gm_test3
isvp17>
isvp17> chdev -l hdisk6 -a pv=clear
hdisk6 changed
isvp17> chdev -l hdisk7 -a pv=clear
hdisk7 changed
isvp17> chdev -l hdisk8 -a pv=clear
hdisk8 changed
isvp17> lspv
hdisk0          00f65d51a5aa3cf1                    rootvg          active
hdisk1          00f65d51bfba4e2e                    test1           active
hdisk2          00f65d5108ff9043                    test2           active
hdisk3          00f65d5108ffefb6                    test3           active
hdisk4          00f65d51c465f8eb                    metro           active
hdisk5          00f65d51cdf2c48c                    swap            active
hdisk6          none                                None
hdisk7          none                                None
hdisk8          none                                None
isvp17>

isvp17> ls -l /dev/rhdisk6
crw-------    1 root     system       18,  6 Mar 21 10:47 /dev/rhdisk6
isvp17> ls -l /dev/rhdisk7
crw-------    1 root     system       18,  8 Mar 21 10:48 /dev/rhdisk7
isvp17> ls -l /dev/rhdisk8
crw-------    1 root     system       18,  7 Mar 21 10:48 /dev/rhdisk8
isvp17>
isvp17> chown oracle:dba /dev/rhdisk6
isvp17> chown oracle:dba /dev/rhdisk7
isvp17> chown oracle:dba /dev/rhdisk8
isvp17> ls -l /dev/rhdisk6
crw-------    1 oracle   dba          18,  6 Mar 21 10:47 /dev/rhdisk6
isvp17> ls -l /dev/rhdisk7
crw-------    1 oracle   dba          18,  8 Mar 21 10:48 /dev/rhdisk7
isvp17> ls -l /dev/rhdisk8
crw-------    1 oracle   dba          18,  7 Mar 21 10:48 /dev/rhdisk8
isvp17>

Then I pressed the Back button on the above screen, followed by Next. As shown in the screen shot below I now have the 3 volumes(LUNS) available to create ASM disk groups.



Friday, March 18, 2011

Running the Hammerora TPC-C workload for Oracle 11gR2

After the completing of the creation of the schema, we will see a screen similar to below.



Next click on the "clear screen button" and the "Destroy virtual users" button. This will create an empty screen under the Script Editor tab, and will destroy the users that created the schema. So the screen will be something like this.



Next, we will the Benchmark from the drop down menu -> TPC-C -> TPC-C Schema Options. This time we will focus on the circled portion of the screen. As seen below I selected the "Standard Driver Script" to generate the load. This script is mainly good if you want to use it for stressing the system.  If you are interested in performance numbers, you should go with the "AWR Snapshot Driver Script". I select 10000 per user for my test. Then clicked OK.



Next, go to the drop down menu Benchmark again. This time select TPC-C -> TPC-C Driver Script.
This will generate the driver script.


Below you seen the script that was created to generate the TPC-C load.



Next we'll need Virtual users to drive the load generation script. So we'll create them by clicking on the Virtual Users drop down menu. In the pop-up screen I entered 10 for virtual users, and decided to go with 5 iterations. Then followed that by clicking OK.



Next I clicked on the "Create Virtual Users" button.  This generated the 10 virtual users, and created a file under /tmp for the logs.



Next, I clicked on the "Run Hammerora TPC-C" button(circled in red) to run the workload. Below is the screen shot of the workload running.




There we go. The Hammerora TPC-C load is running. To see the Transaction information click on TX_Counter drop down menu, enter the connect string information, and click OK.


After that I clicked on the Transaction button(it has something like a pencil on it). This will give you the graph and transaction per minute information.





Thursday, March 10, 2011

Creating a Hammerora TPC-C database

For my next project I wanted to use an Oracle benchmark, something that will help me measure the database performance. After looking around a bit I narrowed it down to Hammerora and Swingbench for the benchmark and stressing the database.

In this post I'll talk about installing and configuring Hammerora, just something basic to see if I can get it to work.

To begin with, I created a small database call "tpcc" using Oracle dbca. Nothing fancy just the basic default database that dbca creates.


[oracle@isvx7 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 10 13:58:21 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> select tablespace_name from user_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS

SQL>
SQL> select file_name,tablespace_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------
/oradata/tpcc/users01.dbf
USERS

/oradata/tpcc/undotbs01.dbf
UNDOTBS1

/oradata/tpcc/sysaux01.dbf
SYSAUX


FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------
/oradata/tpcc/system01.dbf
SYSTEM


SQL>

As my server is a x86_64 server running RedHat Linux 5 I downloaded the appropriate Hammerora binaries from http://sourceforge.net/projects/hammerora/files/hammerora/hammerora-2.5/hammerora-2.5-Linux-x86-64/download

 I then executed the hammerora binary as user oracle.


[oracle@isvx7 ~]$ ./hammerora-2.5-Linux-x86-64
[oracle@isvx7 ~]$ WARNING : Failed to load mysqltcl package -  this package is not mandatory for Hammerora Oracle or Web testing functionality but is required for MySQL testing, it requires at least the MySQL client libraries to be installed and the LD_LIBRARY_PATH environment variable set - see http://hammerora.sourceforge.net


Below are the screenshots to install and configure hammerora


Select the "TPC-C Schema Options" as shown below


  • "Oracle Service Name" is the name of the database that we had created earlier using dbca which is tpcc. 
  • "System user password" is the password that we had given while creating the database using dbca.
  • "TPC-C User" is the name of the new user that hammerora will create for us. I gave the name tpcc to the user, but you can when him anything.
  • "TPC-C User Password" is the password for the hammerora user that will be created.
  • "TPC-C Default Tablespace" I used the users tablespace that dbca had created, as this was a quick and dirty test. Ideally it would have been best to create and new tablespace and passs that to this field.
  • "TPC-C Temporary Tablespace" I used temp for this one.





Now let us check what has been created. To find the tables created by user tpcc, connect as user tcpc to the database and then run.

[oracle@isvx7 ~]$ sqlplus tpcc/tpcc@tpcc

SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 10 12:18:20 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select table_name from user_tables;

TABLE_NAME
------------------------------
CUSTOMER
DISTRICT
HISTORY
ITEM
WAREHOUSE
STOCK
NEW_ORDER
ORDERS
ORDER_LINE

9 rows selected.

SQL>


To show the current database


SQL> SELECT * FROM global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
TPCC

SQL>


To show the current user



SQL> show user;
USER is "TPCC"
SQL>

To describe a table



SQL> desc warehouse;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 W_ID                                               NUMBER(4)
 W_YTD                                              NUMBER(12,2)
 W_TAX                                              NUMBER(4,4)
 W_NAME                                             VARCHAR2(10)
 W_STREET_1                                         VARCHAR2(20)
 W_STREET_2                                         VARCHAR2(20)
 W_CITY                                             VARCHAR2(20)
 W_STATE                                            CHAR(2)
 W_ZIP                                              CHAR(9)

SQL> desc customer;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 C_ID                                               NUMBER(5)
 C_D_ID                                             NUMBER(2)
 C_W_ID                                             NUMBER(4)
 C_FIRST                                            VARCHAR2(16)
 C_MIDDLE                                           CHAR(2)
 C_LAST                                             VARCHAR2(16)
 C_STREET_1                                         VARCHAR2(20)
 C_STREET_2                                         VARCHAR2(20)
 C_CITY                                             VARCHAR2(20)
 C_STATE                                            CHAR(2)
 C_ZIP                                              CHAR(9)
 C_PHONE                                            CHAR(16)
 C_SINCE                                            DATE
 C_CREDIT                                           CHAR(2)
 C_CREDIT_LIM                                       NUMBER(12,2)
 C_DISCOUNT                                         NUMBER(4,4)
 C_BALANCE                                          NUMBER(12,2)
 C_YTD_PAYMENT                                      NUMBER(12,2)
 C_PAYMENT_CNT                                      NUMBER(8)
 C_DELIVERY_CNT                                     NUMBER(8)
 C_DATA                                             VARCHAR2(500)

SQL>

When creating a schema with 25 Warehouses, here are the number of rows per table that gets created by Hammerora.


SQL> select count(*) from customer;

  COUNT(*)
----------
    750000

SQL> select count(*) from district;

  COUNT(*)
----------
       250

SQL> select count (*) from history;

  COUNT(*)
----------
    750000

SQL> select count (*) from item;

  COUNT(*)
----------
    100000

SQL> select count(*) from warehouse;

  COUNT(*)
----------
        25

SQL> select count(*) from stock;

  COUNT(*)
----------
   2500000

SQL> select count(*) from new_order;

  COUNT(*)
----------
    225000

SQL> select count(*) from orders;

  COUNT(*)
----------
    750000

SQL> select count(*) from orders;

  COUNT(*)
----------
    750000

SQL>