Navigation
Learn About
Developing With
Ingres Talk
Information
Toolbox
Views
Dynamic Playback
From Ingres Community Wiki
Contents |
Welcome to the Playback project
News
There are some problems with the native 32 bit Preprocessing binary. It is currently recommended to use the generic binary in the sub-folder "Preprocess-generic"
Scope
This tool takes the output created by the DBMS Server Query Tracing and plays it back into an Ingres Installation. It does that meeting the following criteria:
- The playback can be simulated exactly as it happened in real or accelerated time.
- The statements are guaranteed to be played back in the same order as they were originally recorded.
Contact
Questions about Playback? Drop us a mail: playback@ingres.com
Bugs and feature requests are collated within Community Bug Tracker
Note: Dynamic Playback is an OpenSource community product and as such is not supported as part of your Ingres subscription. If you need support for this product then Ingres can provide expert consultants to assist with the product. Please contact me for more information.
You can also ask any questions in the Forum
Download Binaries
Download the latest binaries from Sourceforge.
If you need binaries for other platforms, please let me know.
Status
A new revision of Playback is released about once a week at the moment. See CHANGELOG for up to date release notes.
The following platforms are supported:
- Preprocessing
- Linux: Mono 1.9 or higher
- Windows: .NET Framework 2.0
- Playback
- Windows
- Linux
- Linux x86-64
- HPUX
- AIX
- Solaris
- VMS will be supported when Ingres on VMS is ported to client side NPTL support
More Platforms might be supported in later versions. The development language is C with Embedded SQL and Mono compatible C# for the Preprocessing.
Features
The features of the current stable version are:
- Parsing the output from SC930 and play it back using a multi threaded approach
- Play back in real time and accelerated time
- Play back as fast as possible with no delays between the statements
- Replicate standard SQL, DML and DDL
- Replicating Repeated SQL
- Replicating Cursor handling
- Printing Ingres error output to the console
- Print number of affected rows to the console
- Capture Load Statistics
- Synchronising all statements to ensure they run in the same order as they originally have. Feature is optional and needs to be switched on.
ToDo list (future versions)
- Create a feature-complete Unit Test
- Convert the Preprocessing to something mor platform independent
- Precalculate variable sleep times and use them with nanosleep() to reduce system load
- Use a socket/synchronising protocol to sync up multiple instances of Playback.
- Playback needs to simulate all the communication channels to the DBMS that were originally used (Local, Ingres/NET, DAS, ODBC...). This probably calls for multiple synced up executables in different programming languages.
- A GUI for Preprocessing?
- Use the Socket Communication feature for a Stats/Progress GUI for Playback?
- Intelligent session failure detection with automatic transaction restart
How to install from a binary package
There is no installation required. Just download the package from Sourceforge and unzip it. The run time requirements are
- Preprocessing
- Linux: Mono Framework 1.9 or higher
- Windows: .NET Framework 2.0
- Playback
- An Ingres installation
How to install from source
If you need a binary for a particular platform, let me know, and I'll try to provide it. Alternatively you can compile it yourself like this:
Step 1: Get the code
Download a source package here.
Step 1a: Get the latest development code
If you want, you can also get the latest development code from our Subversion repository (should always at least compile, contains the latest bugfixes):
svn checkout http://code.ingres.com/apps/playback/main
NOTE: To compile the development version, you will need GNU autoconf to create the configure script:
cd Playback autoconf
The source packages from Sourceforge already contain a configure script so this step is not necessary.
Step 2: Compile and install
If you want to compile the sources you need to have the following prerequisites:
- Preprocessing
- Mono 2.0 or .NET Framework 2.0
- Playback
- SUS2 Compliant C compiler and libs
- GNU make or compatible (for Unix)
- MS Visual C++ 2005 (for Windows)
- Ingres ESQL/C Preprocessor
To build the package on Linux/Unix
- Use an account that has an Ingres Environment sourced
- You can check by typing:
ingstatus
To build just go to the project's root directory and type
make
If you only want to create a specific module, type:
make playback
or
make preprocess
There are no warnings when compiling on Linux using gcc (tested on Ubuntu 9.04 with gcc 4.3.3). Other compilers might issue warnings that will probably be harmless. Nevertheless if you encounter any warnings or errors, please let me know.
To build on Windows:
- Playback
- Use the provided .sln file to build using Visual C++ Express 2008 or higher
- Preprocessing
- Is supported and should build using Visual C# Express 2008 or higher
Getting started
Step 1: Getting session files from SC930
See DBMS Server Query Tracing for information about how to capture playback trace files.
Step 2: Preprocess
Go to the directory that contains your session files and run the Preprocessor:
- Linux
mono Preprocess.exe
- Windows
Preprocess.exe
This will generate one *.psf file per session.
Preprocessing can be used with the following command line switches:
- --path=/path/to/sessfiles A switch indicating the path to the session files. It will also be the output path of the *.psf files
- --dryrun If you specify this switch, no .psf files will be created. The tool will output additional information on the console.
- --filterdb=123456789 This will parse only sessions from the database with the ID 123456789. All other sessions will be ignored. If you want to find out, what IDs your databases have, go to your iidbdb and issue this statement: select db_id, name from iidatabase
- --dbid:123456789=myDatabase This is needed to put database names into the parsed session files. You can add as many --dbid switches as you need
NOTE: Setting aliases for DBIDs is important if you want to play back against multiple databases. If you don't use this switch you will only be able to play back against one database!
Step 3: Playing it back
Change to the directory that contains the *.psf files. Run the command
playback <options>
Here is a list of the command line options:
- -o<option> Runmode.
- -o0 runs the queries as fast as possible (no timings, no delays),
- -o1 runs them in real time simulation. (default)
- -v Verbose. Displays extra output
- -t<step> Step count. This is the number of simulated milliseconds, a simulated tick would jump ahead
- -s<delay> Step delay. This is the number of milliseconds that a simulated tick would take in real time.
- For example, -t10 -s100 would play back 10ms of the trace in 100ms of real time. The default is -t1000 -s1000.
- -d<dbname> Name of the database to connect to
- -u<username> User name to use for the connection. Default is ingres
Note: The database and user name here are only used when the session file contains no db or user information!
- -z Switch on synchronising. This forces the statements to be executed in the original order. The feature is disabled by default.
- -m Mock mode. This is useful if you want to test the tool and have no session files yet. It will run two concurrent sessions issuing very simple catalog queries. It won't break anything.
- -R Ignore repeated queries. Repeated queries are treated as ordinary non-repeated ones.
- -f Turn statistics writing off. The file playbackrun.sh will not be created
Documents
Media:Query Recording and Playback.pdf

