|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.db2os390.ive.da.DB2VisualExplain
DB2VisualExplain is a class to provide all external APIs which used by Visual Explain for DB2/zOS.
genXMLDynamic:
This API retrieves information from DB2/zOS system catalog tables and explain tables and to publish the
desired information used by IVE in XML format.
It does the following things:
Issues the explain statement to DB2/zOS;
Retrieves the information from system catalog tables and explain tables regarding to the explain statement;
Generates the desired information by Visual Explain in XML format.
genXMLStatic:
This API retrieves information from DB2/zOS system catalog tables and explain tables and to publish the
desired information used by IVE in XML format.
It does the following things:
Retrieves the information from system catalog tables and explain tables regarding to the explain statement;
Generates the desired information by Visual Explain in XML format.
enable:
This API creates the DB2/zOS runtime environment for Visual Explain.
It does the following things:
Checks if there is any existing table with the same name as the explain tables,
if so, check the table format;
Migrates explain tables with v7 format to v8 format;
Creates those explain tables under the given schema which will be used by Visual Expalin;
Creates indexes against explain tables.
delete:
This API helps user to maintain size of explain tables.
It does the following things:
Deletes obsolete data which specified by user from explain tables.
migarte:
This API migrates v7 explain tables to V8 format for IVE.
It does the following things:
Creates a bakup explain table to store all data in V7 table;
Migrates v7 table to v8 format.
repair:
This API repairs the DB2/zOS runtime environment for Visual Explain.
It does the following things:
Recreates the missing explain table.
Constructor Summary | |
DB2VisualExplain()
|
Method Summary | |
static void |
delete(java.sql.Connection con,
java.lang.String sqlid,
java.lang.String creator_name,
java.sql.Timestamp timestamp,
int[] error_code,
java.lang.String[] error_token)
Delete some data in explain tables, which is older than specified timestamp. |
static void |
enable(java.sql.Connection con,
java.lang.String sqlid,
java.lang.String creator_name,
java.lang.String db_name,
java.lang.String ts_name,
int[] error_code,
java.lang.String[] error_token)
Creates all explain tables under the given schema name. |
static void |
genXMLDynamic(java.sql.Connection con,
java.lang.String sqlid,
int queryno,
java.lang.String sql,
int degree,
java.lang.String[] xml,
int[] error_code,
java.lang.String[] error_token)
Explains a dynamic SQL query, retrieves information from catalog and explain tables, generates access path and correponding information in XML string format. |
static void |
genXMLStatic(java.sql.Connection con,
java.lang.String sqlid,
int queryno,
java.lang.String sql,
java.lang.String applname,
java.lang.String progname,
java.lang.String collid,
java.lang.String version,
java.sql.Timestamp timestamp,
java.lang.String[] xml,
int[] error_code,
java.lang.String[] error_token)
Retrieves information from catalog and explain tables for a static SQL query, generates access path and correponding information in XML string format. |
static void |
migrate(java.sql.Connection con,
java.lang.String sqlid,
java.lang.String creator_name,
java.lang.String db_name,
java.lang.String ts_name,
java.lang.String tname,
int[] error_code,
java.lang.String[] error_token)
Migrate those v7 explain tables under the given schema which are used by IVE. |
static void |
repair(java.sql.Connection con,
java.lang.String sqlid,
java.lang.String db_name,
java.lang.String ts_name,
java.lang.String tname,
int[] error_code,
java.lang.String[] error_token)
Repairs those explain tables under the given schema which are used by IVE. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DB2VisualExplain()
Method Detail |
public static void enable(java.sql.Connection con, java.lang.String sqlid, java.lang.String creator_name, java.lang.String db_name, java.lang.String ts_name, int[] error_code, java.lang.String[] error_token)
con
- a database connectionsqlid
- current sqlidcreator_name
- the schema name under which the user intends to create explain tablesdb_name
- the database name, the default is DSNDB04ts_name
- the tablespace name, the default is the first 8 characters of the creating table nameserror_code
- stores the error code returned, only the first entry of the array is usederror_token
- stores the detailed error information returned, only the first entry of the array is usedpublic static void delete(java.sql.Connection con, java.lang.String sqlid, java.lang.String creator_name, java.sql.Timestamp timestamp, int[] error_code, java.lang.String[] error_token)
con
- a database connectionsqlid
- current sqlidcreator_name
- the schema name under which the user intends to create explain tablestimestamp
- user specified timestamp, DeleteIVE will delete all data older than this timestamperror_code
- stores the error code returned, only the first entry of the array is usederror_token
- stores the detailed error information returned, only the first entry of the array is usedpublic static void migrate(java.sql.Connection con, java.lang.String sqlid, java.lang.String creator_name, java.lang.String db_name, java.lang.String ts_name, java.lang.String tname, int[] error_code, java.lang.String[] error_token)
con
- a database connectionsqlid
- current sqlidcreator_name
- the schema name under which the user intends to create explain tablesdb_name
- the database name, the default is DSNDB04ts_name
- the tablespace name, the default is the first 8 characters of the creating table namestname
- the name of the table to be migratederror_code
- stores the error code returned, only the first entry of the array is usederror_token
- stores the detailed error information returned, only the first entry of the array is usedpublic static void repair(java.sql.Connection con, java.lang.String sqlid, java.lang.String db_name, java.lang.String ts_name, java.lang.String tname, int[] error_code, java.lang.String[] error_token)
con
- a database connectionsqlid
- the schema name under which the explain table is createddb_name
- the database name, the default is DSNDB04ts_name
- the tablespace nametname
- the name of the table to be repairederror_code
- stores the error code returned, only the first entry of the array is usederror_token
- stores the detailed error information returned, only the first entry of the array is usedpublic static void genXMLDynamic(java.sql.Connection con, java.lang.String sqlid, int queryno, java.lang.String sql, int degree, java.lang.String[] xml, int[] error_code, java.lang.String[] error_token)
con
- a database connectionsqlid
- the schema name under which the explain tables are createdqueryno
- a number to identify the SQL query being explainedsql
- the dynamic SQL query need to explaineddegree
- the degree number to be setxml
- stores the XML string representing access path and other corresponding informationerror_code
- stores the error code returned, only the first entry of the array is usederror_token
- stores the detailed error information returned, only the first entry of the array is usedpublic static void genXMLStatic(java.sql.Connection con, java.lang.String sqlid, int queryno, java.lang.String sql, java.lang.String applname, java.lang.String progname, java.lang.String collid, java.lang.String version, java.sql.Timestamp timestamp, java.lang.String[] xml, int[] error_code, java.lang.String[] error_token)
con
- a database connectionsqlid
- the schema name under which the explain tables are createdqueryno
- a number to identify the SQL query being explainedsql
- the SQL statement stored in SYSIBM.SYSSTMT tableapplname
- the name of the application planprogname
- the name of the program or package containg the query being explainedcollid
- collection identifierversion
- the package versiontimestamp
- the explain timexml
- stores the XML string representing access path and other corresponding information,
only the first entry of the array is usederror_code
- stores the error code returned, only the first entry of the array is usederror_token
- stores the detailed error information returned, only the first entry of the array is used
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |