Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Question: can you find out when an Informix database was last used? Answers: the engine doesn't record connection/access times anywhere, so nothing is available by default. Going forward you can track it yourself, e.g. with a sysdbopen() procedure logging connections to a table/file, or by enabling onaudit auditing (OPDB mnemonic). For looking backwards, suggestions were to check the online/logical log for the last committed insert/update/delete (onstat -m, or onlog on logs not yet overwritten) — which gives a rough date but misses read-only SELECT activity. No precise solution for past usage was found.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Not by default, no. There are things you can do to track that, but the
engine doesn't do it for you
Art
On Dec 21, 2016 18:16, "HUGO PADILLA" <hugo_padilla@terra.com.mx> wrote:
> Hi everybody
>
> Does enybody knows if there is a way to know when was the last time a
> database
> was used
>
> Thanks
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--089e0117610f3dfb570544336716
↪ replying to Art Kagel
HUGO PADILLA — — source: IIUG Forums & Mailing Lists
The connection datetime is not stored in the system tables nor anywhere
else.
However, you can do it for exxample:
- by adding a sysdbopen function on all users and track the time by
storing it somewhere (table, file, etc)
or
- by adding Informix Audit thru onaudit: you can use the OPDB mnemonic
for example.
There are other ways you can also investigate.
Cordialement, Regards,
Khaled Bentebal
Le 22/12/16 00:16, HUGO PADILLA a écrit :
> Hi everybody
>
> Does enybody knows if there is a way to know when was the last time a
database
> was used
>
> Thanks
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
↪ replying to HUGO PADILLA
HUGO PADILLA — — source: IIUG Forums & Mailing Lists
Thank very much for the answers
My boss want to see to the past, not from now to the future :(
If you use database logging and you just need to know when the database was
last used I would look in the online log and see when the last log record was
written. That will give you an idea when an insert, update or delete last
happened last was committed to the log. See onstat -m - No perfect but a
general idea. Will not tell you the last read if someone just does a select.
Regards - Lester
On 12/23/16 11:47 AM, HUGO PADILLA wrote:
> Thank very much for the answers
>
> My boss want to see to the past, not from now to the future :(
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
--
______________________________________________________________________
Lester Knutsen lester@advancedatatools.com
Advanced DataTools Corporation Voice: 703-256-0267 x102
Visit our Web page: http://www.advancedatatools.com
______________________________________________________________________
↪ replying to HUGO PADILLA
SERGIO PERES — — source: IIUG Forums & Mailing Lists
If your database have log and logs not overwritten, you can try onlog to see
the transations and search for what you are looking for. It's not an easy job,
I have done it in the past and worked for me.
Good luck,
SP
sergio.peres@airc.pt
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.