OS environment: Oracle linux/oracle 12.2 rac+db
Download Benchmarksql 5.0:https://sourceforge.net/projects/benchmarksql/from SourceForge
To write this article, Benchmarksql supports firebird,oracle and PostgreSQL
Compile Benchmarksql:
Online about benchmarksql5.0 applicable JDK recommendation 1.7, the author through the verification of 1.7, 1.8 version can be, as long as the compilation and runtime Java version match.
1. Setting environment variables: Export JAVA_HOME=/PATH/TO/JDK export path= $JAVA _home/bin: $PATH
2. Using ant to compile, execute the ant command under the Build.xml directory and encounter the following error at ant compile time:
Error:could not find or Load main class Org.apache.tools.ant.launch.Launcher
Workaround: Export Classpath=.:${java_home}/lib:/usr/share/ant/lib/ant-launcher.jar
Before you run the Benchmarksql, you need to prepare:
CP $ORACLE _home/jdbc/lib/ojdbc8.jar $BENCHMARKSQLPATH/run
Export Classpath= $BENCHMARKSQLPATH/run/ojdbc8.jar$classpath
CP $ORACLE _home/jdbc/lib/ojdbc8.jar $BENCHMARKSQLPATH/lib/oracle (No ORACLE class error will occur if this step is not found
Modify Props.ora:
Conn=jdbc:oracle:thin:@//scanip:1521/yourdb
The Scanip of Oracle RAC provides access to the entire Oracle RAC cluster, the YOURDB part is the database name specified when the database is created, and the local instance name of a database is not configured so that the scan IP Listene sends a request to a node in the cluster based on a specific algorithm when it receives a connection request.
Test conn Correct or not: Sqlplus username/[email Protected]//scanip:1521/yourdb
User and password are the usernames and passwords that are configured in the Oracle database.
TERMINALS=100 (Configure 100 concurrent users), you can configure yourself as needed.
warehouses=1000 (1000 warehouse approximately 120 g of space, need to plan data files in advance in the database)
loadworkers=10
Run Benchmarksql:
CD Run
./runsql.sh Props.ora./sql.common/tablecreates.sql
Nohup./runloader.sh Props.ora >./load.log 2>&1 &
./runsql.sh Props.ora./sql.common/indexcreates.sql
./runbenchmark.sh Props.ora | Tee 100.out
Benchmarksql 5.0 Guide