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.
A newcomer asked how to "empty" logical logs that still showed as full after an onbar -l backup, and how to activate a newly added log that showed as New/Inactive. Replies explained that logs aren't emptied: a log is reusable once it has been backed up, is not the current log, and has no transaction spanning it, but it stays marked used until the engine cycles back to it, so 100% used with a U-B flag is normal. A newly added log only becomes usable after a level-0 archive (e.g. ontape -a / ontape level 0). A sysmaster SQL query for per-log usage was also posted.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
PS — — source: Informix-list mailing list archive (1991-1998)
How to empty the logical logs
I tried to backup ( onbar -l ...) , but still they are full.
I also tried to create a 11th log, but it is marked as NEw, Inactive ! How
to activate it ?
Thanks
↪ replying to PS
Nick Kataria — — source: Informix-list mailing list archive (1991-1998)
If the flag is U-B---- then that log will be used when it's turn will come
(in circular queue fashion). Don't worry if the flag has U-B----- and %used
is 100 or less.
You have to take level 0 archive to make newly added log to be active.
PS <no@mail.please> wrote in message news:8h8j1r$qsg$1@news0.skynet.be...
> How to empty the logical logs
>
> I tried to backup ( onbar -l ...) , but still they are full.
> I also tried to create a 11th log, but it is marked as NEw, Inactive ! How
> to activate it ?
>
> Thanks
>
>
>
↪ replying to PS
Jacob Salomon — — source: Informix-list mailing list archive (1991-1998)
In article <8h8j1r$qsg$1@news0.skynet.be>,
"PS" <no@mail.please> wrote:
> How to empty the logical logs
>
> I tried to backup ( onbar -l ...) , but still they are full.
> I also tried to create a 11th log, but it is marked as NEW,
> Inactive ! How to activate it ?
PS,
Let's take these one at a time:
> How to empty the logical logs
You don't empty the logs. A log is considered available for re-use afe
all of the following conditions are true:
1. It has been saved to tape.
(Loophole alert - if you are logging to/dev/null, it is considered
backed up as soon as the engine starts sending to hte next log.)
2. It is not the current log.
3. There no active transaction spanning the log.
However, it will not be "freed up" until the logging process gets back
around to it and needs to reuse it. This way, you an run onlog against
it for a long time after it has been filled.
Next item:
>How to activate a new log ?
Just run a level-0 archive by any means. Ontape to /dev/null will do
it but I don't reccomend this for a production system.
BTW, if you want to see which logs are actually in use, you can use the
following SQL. It was posted by Mark Stock and I added the comments. I
think I also added some thingies to it but that was a loooong time ago.
-- log-usage.sql - Query to determine, on a log-by-log basis, how much
-- space each logical log has available.
-- Written by: Mark D. Stock (mdstock@informix.com)
-- Commentary by Jacob Salomon
--
-- In this union, the first SQL displays the usage of all log files
-- starting from the oldest transaction in the logs.
-- The second SQL refers to the logs whose unique ID precedes that
-- oldest transaction in the system. It assumes the logs are freeable.
--
-- Part 1: Logs with live trasactions
SELECT number,
uniqid,
size,
trunc((used/size*100), 2) pct_used,
(size-used) free
FROM sysmaster:syslogs
WHERE uniqid >= ( SELECT MIN(tx_loguniq)
FROM sysmaster:systrans
WHERE tx_loguniq > 0
)
AND is_used = 1
UNION
-- Part 2: Logs with no live trasactions and backed up - Freeable
SELECT number,
uniqid,
size,
0.00 pct_used,
size free
FROM sysmaster:syslogs
WHERE uniqid < ( SELECT MIN(tx_loguniq)
FROM sysmaster:systrans
WHERE tx_loguniq > 0
)
AND is_backed_up = 1
UNION
-- Part 3: Logs with no live trasactions but are either not backed up
-- or are new logs that are still unavailable.
SELECT number,
uniqid,
size,
trunc((used/size*100), 2) pct_used,
0.00 free
FROM sysmaster:syslogs
WHERE uniqid < ( SELECT MIN(tx_loguniq)
FROM sysmaster:systrans
WHERE tx_loguniq > 0
)
AND ((is_backed_up = 0) OR (is_used = 0))
order by 1;
HTH
--
+----- Jacob Salomon - DBA JSalomon@bn.com - --------------------------+
|------------------- Bulletin Board Announcement ----------------------|
| Congregants will please note that the bowl at the back of the church |
| bearing the sign "For the Sick" is for monetary contributions only. |
+----------------------------------------------------------------------+
Sent via Deja.com http://www.deja.com/
Before you buy.
↪ replying to PS
Hal Maner — — source: Informix-list mailing list archive (1991-1998)
To backup the logs in IDS 7.x or later:
ontape -a
PS <no@mail.please> wrote in message news:8h8j1r$qsg$1@news0.skynet.be...
> How to empty the logical logs
>
> I tried to backup ( onbar -l ...) , but still they are full.
> I also tried to create a 11th log, but it is marked as NEw, Inactive ! How
> to activate it ?
>
> Thanks
>
>
>
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.