ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

SQL Query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Query

    Hi,

    How to get the logs of all the queries executed successfully or failed SQL queries specific to a user profile executed within particular time frame?
    In this log can all these executed SQL queries be found out?


    Thanks..

  • #2
    You might try:
    1. Start ACS SQL Performance Center
    2. Click the Show Statements... button
    3. Use the "Statements the following user has ever run"

    I've never used that for this purpose, but it sounds promising.

    HTH

    Comment


    • #3
      Thanks, but it's not showing all the executed SQL queries also tried after applying the filter 'statements that ran on or after this date and time:' it's also not showing all SQL queries.

      Also if we do not have this IBM i Access Client Solutions and RDi then How will we be able to fetch these details?



      Thanks...

      Comment


      • #4
        As an aside you see only the queries (or better the access plans of the query) that are run after the last IPL.
        It can also be that the access plans are removed from the SQL Plan cache, for example with a stored procedure provided by SQL or if the plan cache is full, then the oldest the longest not used SQL statements are remove.


        if we do not have this IBM i Access Client Solutions
        Just download and install it.
        https://www.ibm.com/support/pages/ibm-i-access-client-solutions

        Birgitta

        Comment


        • #5
          I did not get what does it mean after last IPL and what does it mean by access plans removal from SQL Plan cache?
          i can see those SQL queries if i page up after i do STRSQL in AS/400 but unable to see when i run 'statements that ran on or after this date and time'

          also evn though if we do not want to install that 'IBM i Access Client Solutions and RDi ' then is there not any alternative way to get details of all the SQL queries executed by particular user profile within specified time period?


          Thanks...

          Comment


          • #6
            Any updates by experts here please?


            Thanks..

            Comment

            Working...
            X