Home skin

 

   Location : TOP > Usage
> Install steps for MySQL(Windows)
 
     
  Step1 Install J2RE and make sure PATH
Step2 Determine install directory for TG
Step3 Copy JDBC driver file
Step4 Make sure you can run TG/TGC
Step5 Make sure you can load JDBC driver
 
     
   >> TOP  
 
   

 

 

 

 

This chapter guides your installation of TG on the following environment.

* If you have choosed TG package with J2RE, install it according to the instraction of the installer and apply procedures from "Step3 Copy Oracle JDBC Driver file(mysql-connector-java-5.1.6-bin.jar) ".


Environment
Platform Windows
JDBC driver JDBC Driver for MySQL (Connector/J)
Target database MySQL

 

  Step1 - Install J2RE and make sure PATH -
Execute the package downloaded from Oracle Corp(former Sun Microsystem's Inc) web site and install it according to the instraction of the installer. If you use "j2re-1_5_0_18-windows-i586-p.exe", java binaries are installed in : C:\Program Files\Java\jre1.5.0_18" by default.

Startup command prompt - cmd.exe - and make sure "java" will run without error.
 
※ COMMAND-LINE SAMPLE
C:\>java -version
java version "1.5.0_18"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02)
Java HotSpot(TM) Client VM (build 1.5.0_18-b02, mixed mode, sharing)
C:\>
 
*if you entountered errors, try following steps to set path for your installed java executable binaries.
1. Right-click My Computer icon on the desktop.
2. Select "Advanced" tab.
3. Click the "Environment variable" button.
4. Scroll down the "System variables" list to the "Path" variable.
5. Double click on "Path".
6. Type (beginning with a semicolon separator) ";C:\jre1.5.0_18\bin" to the end of line.
7. Click "OK" button.
8. Click "OK" to close the System Properties window.
 

 

  Step2 - Determine install directory for TG -
Extract TG ZIP package to a folder of your choice. That directory contains these subdirectories and files :
 
- tgc.bat
- tgc.jar
- tg.bat
- tg.sh
- tg.conf
- tg.jar
- jobs
- lib
- conf
- j2re
:
:
:
:
:
:
:
:
:
:
Startup TGC - TG Controller -.
Contains classes for TGC.
Startup TG on Windows systems.
Startup TG on Linux, UNIX systems.
Contains parameters for TG.
Contains classes for TG.
Contains scripts for JOB.
Contains java libraries.
Contains confifration files for TG.
Contains Sun Microsystems Java Runtime environments.*
 
* It assumes that you have choosed TG package with J2RE.
 

 

  Step3 - Copy JDBC Driver file(mysql-connector-java-5.1.6-bin.jar) -
This section assumes that you have installed TG in "C:\tg09X". Copy MySQL JDBC driver(Connector/J) into the "C:\tg09X\lib" directory.

Then, make sure "tg.bat" batch-file including your installed JDBC driver.
 
 
※ "tg.bat" SAMPLE

@ECHO OFF
REM -- TG - Transaction Generator - [ Version 0.X ] initialization script v.X --
set PATH=.\j2re\bin;%PATH%

REM -- MySQL JDBC DRIVER :
set CLASSPATH=.\lib\mysql-connector-java-5.1.6-bin.jar;%CLASSPATH%

REM -- PostgreSQL JDBC DRIVER :
set CLASSPATH=.\lib\postgresql-8.2-508.jdbc3.jar;%CLASSPATH%

REM -- ORACLE JDBC DRIVER :
set CLASSPATH=.\lib\ojdbc5.jar;%CLASSPATH%

REM -- SQL server JDBC DRIVER :
set CLASSPATH=.\lib\sqljdbc.jar;%CLASSPATH%

REM -- General setting :
set CLASSPATH=.\tg.jar;.;%CLASSPATH%
java.exe -Xmx512m tg %1 %2 %3 %4 %5 %6 %7 %8

 
*You can change the directory which contains JDBC driver. If you want to do so, you must set the CLASSPATH for your installed JDBC driver in the "tg.bat" script which startup TG.
 

 

  Step4 - Make sure you can run TG/TGC-
Run TGC. Double-click "tgc.exe" or Enter at the command prompt :

* If you have choosed TG package with J2RE, you can run TG using Windows START menu.

C:\tg09X> tgc

The window of TGC is displayed, and the start message of TG is displayed on the "TG Console screen" . Look at the sample below.
 
 
 
Transaction Generator 0.9X Mon Jun 11 21:16:25 JST 2008

Checking specified address & Port is possible to use... .OK.
Operating mode : "SERVER_FOR_TGC".
- Listening Address : 0.0.0.0
- Port : 11111

Transaction Generator 0.9X Mon Jun 11 21:16:26 JST 2008
logged in.
TG>
 

 

  Step5 - Make sure you can load JDBC driver -
Click "Agent" and select "Check JDBC driver" and "MySQL". You can test if JDBC driver can be loaded successfully.
 
 

 

When JDBC driver is correctlly loaded , the following messages will be displayed.
 
SAMPLE
TG> check driver mysql
Loading JDBC driver "com.mysql.jdbc.Driver" ... .OK.

TG>
 
*If you recieved following messages, TG failed to load JDBC driver.

Loading JDBC driver "com.mysql.jdbc.Driver" ... .Failed.


See section Step3 - Copy JDBC Driver (mysql-connector-java-5.1.6-bin.jar) - for details and fix the problem.
 

     
   >> TOP > Usage
> Install steps for MySQL(Windows)
 

 

 

 
 

 

 
 
Copyright 2003 - 2009 tgmstr. All rights reserved.