At a very high-level, SQL Test Case Builder can be seen as a way to export a SQL. Currently, Oracle export (expdp) takes a schema or a set of tables and exports all the dependents objects. SQL Test Case Builder provides the same service but takes a SQL statement as input.
What's Inside Test Case Builder?
The main input of SQL Test Case Builder is a SQL object. A SQL object is defined as the SQL text plus all the information required to compile it on a particular database instance (this contains the parsing user name, for example).
Logically, a SQL test case appears as a script containing all the necessary commands to recreate the objects, the user, the statistics, and the environment.
Within the Oracle Diagnosability infrastructure, TCB compiles the problem SQL in a special capture mode to obtain the set of objects to export. A test case captures two types of information:
- Permanent information
- SQL text
- PL/SQL functions, procedures, packages
- Statistics
- Bind variables
- Compilation environment
- User information (like privileges)
- SQL profiles, stored outlines, or other SQL Management Objects
- Meta data on all the objects involved
- Optimizer statistics
- The execution plan information
- The table content (sample or full). This is optional.