The SQL Scanner can scan all SQL statements within database objects. These include materialized query tables, views, procedures, functions, triggers, packages and plan tables. Depending on your database access privileges, available database objects can be selected by their object name, object type, or schema name.
To select database objects in the Add Jobs wizard
In the Database Objects page of the Add Jobs wizard, double-click each branch name to expand or collapse the associated list of sub-items.
Click an individual database object, object type, or schema.
Click or drag the item to the list on the right (Selected objects).
To remove an item from the right-hand box [Selected objects], click or drag that item out of the list box back to the tree diagram (Database objects).
or
Click the button to open the Add Database Objects window.
Select the database, user, and object type.
Using the % wildcard, enter the filtering criteria. The filter is case sensitive, so you must match the upper or lowercase of the database object.
Select the database objects.
With the help of the DB2 Event Monitor you are able to capture SQL statements while they are currently running on the database server. Capturing SQL statements with the Event Monitor allows SQL Scanner to identify problematic SQL statements running on the database server.
To add an Event Monitor in the Add Jobs wizard
In the DB2 Event Monitor page of the Add Jobs wizard, a list of available Event Monitors appears on the left-hand list box. Select Show all Event Monitors checkbox to display all the Event Monitors, or unselect to display only the Event Monitors owned by the currently selected schema.
Select an Event Monitor and click . If no Event Monitor files or tables are found in the target directory, then you will be prompted to enter the path of the Event Monitor.
To scan the Event Monitors using a particular schema, select the Specify schema checkbox and select the schema using the Schema list.
The SQL Scanner can scan through any source code stored as a text or a binary file to identify SQL statements.
To select source code files in the Add Jobs wizard
In the Source Code page of the Add Job wizard, select the file type: Text or binary files or COBOL programming source code.
Click .
Select the individual files.
Click Open.
Select the schema that corresponds with the SQL that you are scanning from the Schema box.
You may want to scan the SQL Inspector to identify the SELECT, INSERT, UPDATE and DELETE SQL statements with their query plan, abstract plan and trace on information (if available). This enables you to review the query plan and helps to give a better understanding of which SQL statement is causing the performance problem within the database server.
To add a SQL Inspector
Click the SQL Inspector page. The left-hand list field displays a list of available Inspectors. If you have not yet created any Inspectors, this list field is blank.
Select an Inspector and click or drag the Inspector you want to scan over to the right-hand list field.
Use the Set Scheme list to select the schema that corresponds with the SQL that you are scanning.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center