ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Doubt related to interactive SQL -> STRSQL

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Doubt related to interactive SQL -> STRSQL

    Hello Friends,

    I have two doubts related to interactive SQL in iseries.

    1) Is there any way to default the option 4=Save session in source file while exiting the SQL?

    We want to track the SQL queries executed by any USER(s).

    This is required to keep track on the SQL updates/ inserts.

    2) I Google'd and found out one command DMPSYSOBJ which keeps track of the SQL queries for Users but the doubt here is how many days data will be there to view?

    Kindly, help me out on this.

    Thanks! in advance.

  • #2
    Re: Doubt related to interactive SQL -> STRSQL

    Are you allowing users access to STRSQL and run sql statements?
    How do you stop them from deleting *ALL records or just dropping a table?

    I would think it better if they had access to query or better yet some business intelligence software.

    Can you please explain more?

    thank you
    Jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Doubt related to interactive SQL -> STRSQL

      Thanks for your reply Jamie.

      Are you allowing users access to STRSQL and run sql statements?
      Yes we are allowing the STRSQL and runqry access to users.

      How do you stop them from deleting *ALL records or just dropping a table?
      Sorry for not providing better clarity in my question, actually we want to keep track of any DML statements executed by the user.

      I have tried one thing but want to have your say on this:

      1. STRDBMON for a session (stored in an outfile)
      2. STRSQL
      3. ENDDBMON

      But apart from doing this I just wanted to know that is there any other way to save the interactive SQL sessions?

      Comment


      • #4
        Re: Doubt related to interactive SQL -> STRSQL

        Sorry, I did take a quick peek, but I didnt see a way to do what you are asking.

        Jamie
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: Doubt related to interactive SQL -> STRSQL

          I guess you could stop a user deleting records with SQL by using REVOKE? Regarding saving the updates you might be better to journal the file? That would give you the big picture rather than just the updates done by a particular user.
          Ben

          Comment


          • #6
            Re: Doubt related to interactive SQL -> STRSQL

            Thanks! for your time Guys.

            If a User is having *ALLOBJ authority will the REVOKE work? I have not tried it, will check.....

            Journalling is on, we just wanted to get the queries used by the Users for manipulating the data.

            Comment


            • #7
              Re: Doubt related to interactive SQL -> STRSQL

              If a user has *ALLOBJ authority, you have bigger problems at hand. If they have *ALLOBJ and a command line and SQL, one bad sql statement means goodbye data. (Likely, goodbye company)

              I dont even allow myself to have ALLOBJ authority on my own machine.
              Michael Catalani
              IS Director, eCommerce & Web Development
              Acceptance Insurance Corporation
              www.AcceptanceInsurance.com
              www.ProvatoSys.com

              Comment


              • #8
                Re: Doubt related to interactive SQL -> STRSQL

                Originally posted by rudra View Post
                Thanks! for your time Guys.

                If a User is having *ALLOBJ authority will the REVOKE work? I have not tried it, will check.....

                Journalling is on, we just wanted to get the queries used by the Users for manipulating the data.
                *ALLOBJ means just that...they have all authority to all objects (including the data with them) so no it will not work.
                I'm not anti-social, I just don't like people -Tommy Holden

                Comment


                • #9
                  Re: Doubt related to interactive SQL -> STRSQL

                  Thanks! a lot everyone......

                  I will take a note of that and let my Boss be aware of that.

                  Thanks! again.

                  Comment

                  Working...
                  X