Setting up the schema used for stubbing a physical database
About this task
If you are using Rational Integration Tester 8.5.0 or later and you want to simulate an IBM IBM DB2®, Oracle, Microsoft SQL Server, or MySQL database, you can use the integrated simulation database or a vendor-specific database. If you want to use the vendor-specific database, your database administrator (DBA) first needs to create a separate schema for the stub data. The schema must match the corresponding database. For example, to stub an Oracle database, you need an Oracle schema. Alternatively, to stub a Microsoft SQL Server database, you need a Microsoft SQL Server schema, and so on.
- An application may be using SQL syntax that is not understood by the integrated simulation database. This will be evident if the console of the application displays messages about unexpected JDBC exceptions during the recording (learning) phase. If you are using the Rational Integration Tester JDBC proxy, these SQL errors are also logged in the activity log of IBM Rational Test Control Panel, which is viewable if you have Rational Test Control Panel administrator privileges.
- A database might support a data type that the integrated simulation database does not support. This will be evident if you try to edit a database table of a database stub that includes a data type not supported by the Apache Derby database. Rational Integration Tester will display SQL syntax error messages when saving the database table.
- While Rational Integration Tester is "learning" the stubs
- When a stub is started, that is, the database schema or the integrated database will be used to store the contents of a database stub
grant CREATE SESSION, ALTER SESSION, -
CREATE PROCEDURE, -
CREATE SEQUENCE, CREATE SYNONYM, CREATE TABLE, -
CREATE TYPE, UNLIMITED TABLESPACE -
to VIRT_USER;
The following table lists the live and simulation database combinations that are supported by different versions of Rational Integration Tester.
Live and simulation database combination support | Rational Integration Tester version |
---|---|
DB2/DB2 | All |
DB2/Integrated simulation database (excluding support for JDBC virtualization on IBM WebSphere® Application Server) | 8.5.0 or later |
DB2/Integrated simulation database (including support for JDBC virtualization on WebSphere Application Server) | 8.5.1 or later |
Microsoft SQL Server/Microsoft SQL Server | All |
Microsoft SQL Server/Integrated simulation database (excluding support for JDBC virtualization on WebSphere Application Server) | 8.5.0 or later |
Microsoft SQL Server/Integrated simulation database (including support for JDBC virtualization on WebSphere Application Server) | 8.5.1 or later |
MySQL/MySQL | All |
MySQL/Integrated simulation database (excluding support for JDBC virtualization on WebSphere Application Server) | 8.5.0 or later |
MySQL/Integrated simulation database (including support for JDBC virtualization on WebSphere Application Server) | 8.5.1 or later |
Oracle/Oracle | All |
Oracle/Integrated simulation database (excluding support for JDBC virtualization on WebSphere Application Server) | 8.5.0 or later |
Oracle/Integrated simulation database (including support for JDBC virtualization on WebSphere Application Server) | 8.5.1 or later |
Procedure
- Modify the default value of the Max Row Count field. The default value of the field is 10,000. You can decrease this default value to limit the maximum number of rows copied when learning from a live database or when copying rows into a database stub.
- Modify the default value of the Max Stored Procedure Calls field. The default value of the field is 10,000. If the system under test is very active, you can decrease the value of this field, thus limiting the quantity of data captured by Rational Integration Tester while learning.
- Modify the default value of the Max Result Set Row
Count field. The default value of the field is 10,000.
You can decrease this default value to limit the maximum number of
rows copied when learning a result set returned from a stored procedure
and thus limit the amount of information that Rational Integration Tester will
learn while creating a new database stub. You might want to use this
field if you cannot or do not want to modify the behavior of the system
under test.
Limitation: If the result set returned by a stored procedure is scroll-sensitive and dynamic, then the JDBC virtualization cannot learn the stored procedure call.
- Click the Unique option radio button (default) if you want to record only unique invocations of a stored procedure based on the input parameters. Alternatively, click the All option radio button to record all invocations of a stored procedure.
Results
You are now ready to create database stubs.