Skip to content

Using rwloadsim for scripting

Bjørn Engsig edited this page Oct 11, 2023 · 15 revisions

Scripting using RWP*Load Simulator

Whether your are a developer, a database administrator, performance engineer, or do some other work where you directly interact with the Oracle Database, you are likely to use standard tools like sqlplus or sqldeveloper as your daily routine. You may use such tools to execute SQL and/or PL/SQL, and you may frequently use the command like with a shell such as /bin/bash. Typing commands, typing SQL, and writing code or scripts are likely to be part of your routine.

This is exactly where the RWP*Load Simulator fits well into your existing habits. In addition to its original design purpose of simulating load on an Oracle Database, it has also evolved to be a very useful scripting tool. You can think of it a bit as if you could write shell scripts that directly can execute SQL or PL/SQL, or as if PL/SQL could run on the client side. It effectively is a programming language that effectively combine typical scripting features of e.g. the shell with an ability to execute SQL.

This page take you through a set of cases from the simple to the complex.

Install rwloadsim for scripting use

When the RWP*Load Simulator is being used purely for scripting, the installation is straight forward. It is available for 64 bit Linux on X86 and ARM:

  • Get an appropriate version of Oracle Instant Client. Version 19 or 21 is recommended.
  • Download the complete rwloadsim binaries from github releases.
  • Follow the instructions at INSTALL.html; a repository database is not required unless you also want to use rwloadsim for actual workload simulation.

The EMP and DEPT tables

The EMP and DEPT tables have been part of the Oracle distribution since the very early times. Although they have been replaced with far more appropriate test schemas,

Clone this wiki locally