Monday, November 26, 2012

Viewing SQL Queries Against AS400

Viewing SQL queries against an AS400 iSeries:

  1. Open iSeries Navigator
  2. Expand the System (i.e. or PROD400)
  3. Expand "Databases"  (*Note:  If Databases does not exist, run a Selective Reinstall of iSeries Access for Windows and Select "iSeries Navigator", "Databases".  On a side note, you may also want to install everything under iSeries Navigator as well as "Data Access", "ODBC" and "Data Transfer", "Base" as well as "Excel Add-In")
  4. Expand the System Name (i.e. S10bABC)
  5. Right click on SQL Plan Cache Snapshots
  6. Click SQL Plan Cache
  7. It is strongly recommended to set up some filters to limit the results. (i.e. Set date/time, User, etc)
  8. You should be able to read the SQL Queries in the result window.  Click it to view the entire statement.

No comments: