Re: Logging status of a database
Posted in 1996
Neil,
>
> What, IYHO, the simplest method of showing the logging status of a
> database?
>
If its Online 7.1 the simplest way is to check the sysmaster database.
(Note, the following is an extract from my articule on the sysmaster database
for the Washington Area Informix Users Group Newsletter)
In this database is a view sysdatabases described as follows:
name char(18), database name
partnum integer, table id for systables
owner char(8), user name of creator
created integer, date created
is_logging bitval flag indicating unbuffered logging, 1=Yes,0= No
is_buff_log bitval flag indicating buffered logging, 1=Yes,0= No
is_ansi bitval flag indicating ANSI mode database, 1=Yes,0= No
is_nls bitval flag indicating NLS support, 1=Yes, 0= No
flags smallint flags indicating logging
The following is a script to list all databases, owners, dbspaces and logging
status. Notice the function dbinfo is used. This is a new function in 7.X,
with several uses, one of which is to convert the partnum of a database into
its corresponding dbspace. This function will be used in several examples
that follow.
Figure 6: SQL Script - dblist.sql
-- Script: dblist.sql - List all databases, owner and logging status
database sysmaster;select
dbinfo("DBSPACE",partnum) dbspace,
name database,
owner,
is_logging,
is_buff_log
from sysdatabases
order by dbspace, name;
Regards - Lester
#############################################################################
# Lester Knutsen lester@access.digex.net #
# Advanced DataTools Corporation Voice: 703-256-0267 #
# Grant group privileges for Informix databases with DB Privileges #
# Visit our Web page: http://www.access.digex.net/~lester #
# Washington Area Informix User Group: http://www.access.digex.net/~waiug #
#############################################################################