Tag Archives: Informix

Getting the duration of the last Informix level 0 backup with onbar

Sometimes you may want to quickly review the duration of the last level 0 backup from a system.
We can do this by using the sysutils database. When a backup runs it writes to a series of tables. We use the bar_action and bar_instance tables .

We want to get the diff of the act_start of the first object being backed up and the act_end of the last object completing.

A simple sql to do this is:


SELECT
    -- Get the difference from the start to the end, return it in hour to second
    ((MAX(act_end) - MIN(act_start))::INTERVAL HOUR TO SECOND)::CHAR(10),
    -- Get the raw start and end times in case they are needed
    MAX(act_end) end_time, MIN(act_start) start_time
FROM bar_action, bar_instance
WHERE
        bar_action.act_aid = bar_instance.ins_aid
        AND bar_action.act_oid = bar_instance.ins_oid
        AND bar_instance.ins_level = 0
        -- Ignore non chunk backups
        AND bar_instance.ins_backup_order > 0
        -- V 15 treats it as 1,  V14 will list it as '5'.
        AND bar_action.act_type in (1,5)
        AND bar_instance.seal_time = (SELECT MAX(seal_time) FROM bar_instance WHERE ins_level = 0 and rsam_time > 0)



Note, this does not work for ontape backups, only onbar.

Tom Beebe (tom@xdbsystems.com)

WAIUG Meeting Dec 11 2014 Registration

Please join us for the next Washington Area Informix User Group meeting, Thursday, Dec 11, 8:30 AM – 12 Noon at the IBM office in Washington DC.

This event will feature content rich presentations by leading Informix Users and experts that will most certainly touch on aspects of the Informix software features that you are using and may be interested in.

– Art Kagel, Independent consultant and IIUG Board Member, will present on programming, concurrency, and tuning applications against Informix
– Carlton Doe, IBM Informix Database Specialist, presenting on Informix Flexible Grid
– Tom Beebe, Advanced DataTools consultant and IIUG Board Member, will speak about running Informix on the ARM architecture

Date: Thursday, December 11, 8:30 – Noon
Location: IBM, 600 14th St NW, Washington DC

There are 2 metro train stations very close by. Metro Center is 2 blocks to the East and McPherson Square is 3 blocks to the North. There are also pay garage parking alternatives in the close vicinity.

The start time will be 8:30 (doors open at 8:00).

Please RSVP Below: