Home skin

 

   Location : TOP > Usage
> Install steps for PostgreSQL(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.

Environment
Platform Windows
JDBC driver PostgreSQL JDBC Driver
Target database PostgreSQL

 

  Step1 - Install J2RE and make sure PATH -

* If you have choosed TG package with J2RE, skip this step and proceed next.

Execute the package downloaded from Sun Microsystem's Inc site and install it according to the instraction of the installer. If you use "j2re-1_4_2_01-windows-i586.exe", java binaries are installed in : C:\Program Files\Java\j2re1.4.2_01" by default.

Startup command prompt - cmd.exe - and make sure "java" will run without error.

 
※ COMMAND-LINE SAMPLE
C:\>java -version
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
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:\j2sdk1.4.2_01\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(jdbc7.1-1.2.jar) -

This section assumes that you have installed TG in "C:\tg08X". Copy PostgreSQL JDBC driver(jdbc7.1-1.2.jar) into the "C:\tg08X\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 --
set PATH=.\j2re\bin;%PATH%

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

REM -- PostgreSQL JDBC DRIVER :
set CLASSPATH=.\lib\jdbc7.1-1.2.jar;%CLASSPATH%

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

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

 

*You can change the directory which contains Oracle 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 :

C:\tg08X> 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.

 
 
 

TG - Transaction Generator - [ Version 0.8X ] Mon Jun 11 21:16:25 JST 2007

Checking specified address & Port is possible to use... .OK.
Now TG is running in "Slave Mode".
- Listening Address : 0.0.0.0
- Port : 11111

TG - Transaction Generator - [ Version 0.80 ] Mon Jun 11 21:16:26 JST 2007
logged in.
TG> autoexec on
Autoexec "ON".
TG> masterserver on
MasterServer "ON".
TG> spool off
Spool function is already "OFF".
TG> set tpsmonitor true
TPS-monitor signal has been enabled.
TG>

 

 

  Step5 - Make sure you can load JDBC driver -

Click "Agent" and select "Check JDBC driver" and "PostgreSQL". 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 postgresql
Loading JDBC driver "org.postgresql.Driver" ... .OK.

TG>
 

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

Loading JDBC driver "org.postgresql.Driver" ... .Failed.

See section Step3 - Copy JDBC Driver(jdbc7.1-1.2.jar) - for details and fix the problem.

 

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

 

Copyright 2003 - 2008 tgmstr. All rights reserved.