立即与支持人员聊天
与支持团队交流

SQL Optimizer for DB2 LUW 4.3.1 - User Guide

SQL Optimizer for IBM® DB2® LUW
About SQL Optimizer for IBM DB2 LUW Getting Started Options SQL Scanner SQL Optimizer SQL Formatter SQL Inspector Database Explorer SQL Repository Index Impact Analyzer Index Usage Analyzer User-Defined Temp Table Editor Functions SQL Functions SQL Information and Functions Activity Log
Tutorials About us Copyright

Summary

The Summary page in the Add Jobs wizard in the SQL Scanner shows a list of the jobs that were selected for scanning.

 

Scan

The SQL Scanner only scans Jobs that are "marked." The Jobs are automatically marked when they are added by the Add Jobs wizard.

To mark a Job

Clicking the Job row. The image\I_RedCheckmark.gif red checkmark will be prefixed to the File / Database Object column. Multiple Jobs can be marked at a time. If there are no marked Jobs, the Scan button is dim and scanning cannot begin.

To unmark a Job

Click the marked row.

To scan the marked Jobs

Click image\B_Scan.gif.

During and after scanning, information is updated on the Job Manager window and the image\I_RedCheckmark.gif sign is replaced with image\I_Scan.gif sign. The time required to scan a Job depends on the system's processor speed, the file size and the number of valid and invalid SQL statements. See Scanned SQL Statement Classification for more information about invalid statements.

To abort the scanning process

Click image\B_AbortScan.gif.

 

 

Scan Source Code with Temporary Tables

During scanning, if the scanned SQL statement is used to create or modify a temporary table, the SQL will be automatically executed if the Create Scanner Temp Table checkbox in the Options is selected. The created Scanner Temp Tables will be dropped after the job has finished scanning.

Example

Source Code

declare global temporary table session.ABC

  like EMPLOYEE

  on commit delete rows

  not logged

 

select *

  from session.ABC

 

After scanning in the Scanned SQL Viewer, you will see the SQL statement displayed in the Scanned SQL pane as:

select *

  from session.ABC   

 

The DDL for creating the temporary tables is displayed under the Scanner Temp Table tab in the SQL Information. This includes the DDL found by the SQL Scanner or the DDL used to create the User-Defined Temp Table.

declare global temporary table session.ABC

  like EMPLOYEE

  on commit delete rows

  not logged

Note: To create or modify temporary tables SQL Scanner, the logon user needs the following privileges:

  • Connection to DB2 LUW 7 or above

  • USE privilege on the USER TEMPORARY table space or SYSADM or DBADM authority.

 

Abort Scan

To abort the scanning process

Click image\B_AbortScan.gif.

The Abort Scan function may take a few seconds to complete, as time is needed to close down all the necessary processes.

 

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级