General description

When you use the iSeries Modules version 6 and you want to configure SQL to retrieve auditing information about the execution of the command STRSQL into your iSeries system, you will notice a huge difference comparing it to version 5 or lower, here you have the steps you must follow to activate this auditing: 

Configuration of the SQL Monitor

Through the menu of T4NICELINK (you can access it executing: GO T4NICELINK/T4NICELINK in your command line), we must go to the SQL Monitor configuration (option 6 and then option 60):

 Op 60 – 1: SQL Monitor Maintenance

Create a filter with F6 and set it to capture all the Interactive activity, by default it will be something like: "QINTER, *ALL, *ALL..."

 Op 60 – 3: Configure Monitor

Automatic monitor start  . . . .   *YES     

Send to Smart Console  . . . . .   *NO

Retrieve events from . . . . . .   *NOW

Check interval . . . . . . . . .   12

Retrieve variables . . . . . . .   *YES

Number of Hours to Keep  . . . .   3

Cycle no. to delete operation  .   300

Execute STRDBMON for all jobs  .   *NO


Configuration of the SQI Monitor

Through the menu of T4NICELINK (you can access it executing: GO T4NICELINK/T4NICELINK in your command line), we must go to the SQL Monitor configuration (option 6 and then option 61):

Op 61 – 14: Change Interactive SQL monitor settings

Send to Smart Console  . . . . .   *YES

Audit only STRSQL  . . . . . . .   *YES

Op 61 – 21: Work with Kernel Supervisor

Op 22: Set Autostart defaults (Start at IPL recommended)

Automatic start of supervisor  .   *YES 

Configuration of the subsystem description T4NICELINK

Job                       Job Description       Library   

KRNSUPERV        KRNSUPERV         B_DETECTOR
SQLMONITOR       SQLMONITOR        B_DETECTOR 

Active Jobs in the T4NICELINK Subsystem

If we run in the command line this: "WRKACTJOB SBS(T4NICELINK)" we should see something like this:

T4NICELINK      QSYS          SBS     .0                   DEQW
KRNSUPERV    QPGMR       ASJ      .0                   DEQW
SQLMONITOR   QPGMR       ASJ      .0  DLY-12           DLYW    

Stopping the SQL MONITOR, KERNEL SUPERVISOR and SYSTEM TRACE

SQLMONITOR

Op 60 – 4: End Monitor

KRNSUPERV (SQIMONITOR)

Op 62 – 23: End Kernel Supervisor

System Trace

ENDDBMON JOB(*ALL) 

Recommendation

After doing all these steps, it could be necessary to issue these two commands:

ENDSBS T4NICELINK *IMMED
Wait a minute or two
STRSBS T4NICELINK/T4NICELINK

Also, it's important to understand that the agent will start working with NEW jobs, this means jobs that are being started into the QINTER subsystem after doing all these steps.

You can verify that the agent is capturing information like this:

1) Execute an STRSQL command
2) Issue this query: "select * from b_detector/SILOG01X order by init_tms desc"


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: October 23, 2018