• [Info-ingres] Checking logging status of a session

    From Adrian Williamson@21:1/5 to Steve on Tue Aug 4 09:54:54 2020
    To: info-ingres@lists.planetingres.org

    Hi,

    You mean things like QEP, PRIN TQRY, GCA , SC390 or something else like auditing?

    You can switch some of them off then on to make sure they are in the state
    you want but others might be tricky.

    You should be able to get the Ingres environment to check variables like ING_SET etc. depending on what language you are using.

    Cheers

    Adrian



    -----Original Message-----
    From: info-ingres-bounces@lists.planetingres.org <info-ingres-bounces@lists.planetingres.org> On Behalf Of Steve
    Sent: 04 August 2020 09:33
    To: info-ingres@lists.planetingres.org
    Subject: [Info-ingres] Checking logging status of a session

    How can I check the logging status of the current session? I thought I might
    be able to call dbmsinfo, but I don't see an option for logging.

    Thanks
    Steve
    _______________________________________________
    Info-ingres mailing list
    Info-ingres@lists.planetingres.org https://lists.planetingres.org/mailman/listinfo/info-ingres

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?iso-8859-1?Q?Laframboise=2C_Andr=@21:1/5 to Roy Hann on Tue Aug 4 14:17:50 2020
    To: info-ingres@lists.planetingres.org (info-ingres@lists.planetingres.org)

    Turning off logging should be grounds for dismissal ......

    BTW: Logging to a Canadian, involves cutting down trees ..... :)


    André Laframboise

    Conseiller Principal Base de Données, Direction générale de la gestion de l'information et Technologie de l'information
    Bibliothèque et Archives Canada / Gouvernement du Canada andre.laframboise@canada.ca / Tél. : 613-298-1346

    Senior Database Advisor, Information Management and Information Technology Branch
    Library and Archives Canada / Government of Canada
    andre.laframboise@canada.ca / Tel: 613-298-1346

    -----Original Message-----
    From: info-ingres-bounces@lists.planetingres.org <info-ingres-bounces@lists.planetingres.org> On Behalf Of Roy Hann
    Sent: Tuesday, August 4, 2020 9:52 AM
    To: info-ingres@lists.planetingres.org
    Subject: Re: [Info-ingres] Checking logging status of a session

    Steve wrote:

    How can I check the logging status of the current session? I thought I
    might be able to call dbmsinfo, but I don't see an option for logging.

    Logging is one of those terms (like "key") that is so overloaded with meanings that I could lead you seriously astray if I just assume I know what logging is of interest.

    If you mean transaction logging: Ingres just does it. You can (if you are very bold or very careful) turn it off, but you can't turn it off by accident. Running with transaction logging turned off is potentially a catastrophe waiting to happen. If you
    think it's not turned on you should probably shut Ingres down till you find out who did it and send them for re-education.

    If you mean journaling: HELP TABLE will tell you if a specific table is journalled. All tables are created with journalling on by default unless that default has been changed. The default can be examined (and
    changed) using CBF. Sessions cannot control whether their activity is journalled; it is system-wide behaviour.

    If you mean SC930/session activity logging: I don't think there is a way to ask the session. You can take a look in the configured logging location (ingprenv II_SC930_LOC if you're using Ingres 9/10.x) to see if there is an appropriately named file with
    a recent/changing timestamp.

    But perhaps you mean another kind of logging...

    Roy


    _______________________________________________
    Info-ingres mailing list
    Info-ingres@lists.planetingres.org https://lists.planetingres.org/mailman/listinfo/info-ingres

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roy Hann@21:1/5 to Laframboise on Tue Aug 4 20:13:07 2020
    Laframboise wrote:

    Logging to a Canadian, involves cutting down trees ..... :)

    I did say the word is overloaded! :-)

    Roy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve@21:1/5 to Roy Hann on Fri Aug 28 02:54:12 2020
    On Wednesday, August 5, 2020 at 6:13:10 AM UTC+10, Roy Hann wrote:
    Laframboise wrote:

    Logging to a Canadian, involves cutting down trees ..... :)
    I did say the word is overloaded! :-)

    Roy

    No, I didn't mean the Canadian-logging! :D

    Sorry, transaction logging.

    I was editing a shell script process where someone had commented out ALL the error handling! Some of the commented out error handling code indicated the database would be marked inconsistent if the transaction failed with nologging enabled. Hence I
    wondered if there was a way to check if logging was enabled/disabled from within a shell script.

    Could one turn off logging using ING_SET?

    Andre, your point about grounds for dismissal are noted. :D

    Steve

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roy Hann@21:1/5 to Steve on Fri Aug 28 11:09:14 2020
    Steve wrote:

    Sorry, transaction logging.

    I was editing a shell script process where someone had commented out ALL
    the error handling! Some of the commented out error handling code
    indicated the database would be marked inconsistent if the transaction
    failed with nologging enabled.

    That is exactly what would happen and it is unrecoverable. So if you are
    going to turn logging off you may as well comment out the error handling because you are screwed. There is no handling to be done. The only
    option is to roll forward from the last good checkpoint up to the moment logging was turned off.

    Hence I wondered if there was a way to
    check if logging was enabled/disabled from within a shell script.

    Could one turn off logging using ING_SET?

    If one were absolutely insane, yes. Set ING_SET and restart Ingres. I
    can think of no defensible reason ever to do that.

    So to answer your question a little differently, you don't need to check
    if logging is turned off because it is such a grossly abnormal situation
    you just shouldn't be routinely running Ingres that way. I'll repeat my
    earlier comment: if you only suspect logging is turned off (i.e. you
    didn't turn it off yourself having first taken the necessary
    precautions so you know *for sure* it is off) shut Ingres down and
    restart it. You should also do an off-line checkpoint to reinitialize journaling before you start using the database(s) again.

    Roy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roy Hann@21:1/5 to Roy Hann on Fri Aug 28 11:38:11 2020
    Roy Hann wrote:

    If one were absolutely insane, yes. Set ING_SET and restart Ingres.

    That came out wrong. "...restart your Ingres application/job."

    Roy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)