Using SQL to find the number of logical logs that are not backed up

Technote (FAQ)


Question

Is there an SQL statement to determine the number of logical logs that are not backed up?

Answer

By querying the sysmaster database you can determine the number of logical logs that are not backed up. You can use this information to decide if a logical log backup is necessary.

Run the following SELECT statement from any application:

    SELECT COUNT(*) AS ll_not_backup,
           (SELECT COUNT(*) FROM syslogs) AS total_ll
    FROM   sysmaster:syslogs
    WHERE  is_backed_up = 0;

The following table explains the columns in the output of the SELECT statement:


Column name
Column Description
l l_not_backup
Is the number of logical logs that are not backed up.
total_ll
Is the total number of logical logs defined for the instance

Note: The information displayed changes dynamically, so it is accurate at the time it is generated.


    Example:

    This example shows that the instance has 6 logical logs defined and 1 of these log was not backed up.

    ll_not_backup         total_ll
                 1                6

Rate this page:

(0 users)Average rating

Document information


More support for:

Informix Servers

Software version:

7.3, 9.4, 10.0, 11.1, 11.5, 11.7

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Reference #:

1226562

Modified date:

2012-10-23

Translate my page

Machine Translation

Content navigation