How to Create a SQL-testcase Using the DBMS_SQLDIAG Package [Video]
Last updated on JULY 14, 2017
Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.4 and later
Information in this document applies to any platform.
Video - How to create a SQL Testcase using DBMS_SQLDIAG (04:54)
How to create a SQL-testcase using the DBMS_SQLDIAG package.
Export the testcase using DBMS_SQLDIAG.EXPORT_SQL_TESTCASE and import it again via DBMS_SQLDIAG.IMPORT_SQL_TESTCASE.
The package DBMS_SQLDIAG is available from 10.2.0.4 onwards, but Oracle11g or later has additional procedures / functions available. The '10.2.0.4.0' is a subset of the 11G package.
This document describes the use of dbms_sqldiag.export_sql_testcase() using the SQL_ID of a cursor.
The SQL_ID might not always be available, for instance in cases where the parsing of a SQL statement fails.
Other versions of the export_sql_testcase() are using the SQL-statement or the INCIDENT_ID in case it is related to an error and can be used instead.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms