Checking the logging status of the database
Posted in 2009
A user on IDS 11.5/RHEL 5.3 asked how to check a database's logging mode from the command line, and also hit "Termcap entry too long, Segmentation Fault" when running onmonitor. Replies pointed to querying sysmaster:sysdatabases (columns is_logging, is_buff_log, is_ansi) via dbaccess, plus Art Kagel's listdb7 utility from his utils2_ak package and a shell script that decodes the flags into N/U/B/A. For the terminal crash, setting TERM to vt100/vt220 was suggested; the poster confirmed TERM=VT220 fixed onmonitor and the sysdatabases query gave the logging status.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: General Discussion
Hi, We are using the IDS 11.5 in RHEL 5.3 platform I want to check the logging mode of the database. We are using the database in the "No logging" and "Unbuffered" mode. Is there any command available in IDS to check the logging mode? Also i have used the utility "onmonitor", upon which on running gives the message "Termcap entry too long, Segmentation Fault" Any help is appreciated! Thanks, Lakshmi
select * from sysmaster:sysdatabases where name=3D'<database>'
<= br />j.
On Jun 5, 2009, LAKSHMI DEVI PALA= NISSAMY <lakshmidevip@hcl.in>
wrote:
Hi,
We are using the IDS 11.5 in = RHEL 5.3 platform
I want to check the logging mode of the datab= ase. We are using
the database in
the "No logging" and "Unbuffered" m= ode.
Is there any command available in IDS to check the logging= mode?
Also i have used the utility "onmonitor", upon which on = running
gives the
message "Termcap entry too long, Segmentation Fault= "
Any help is appreciated!
Thanks,
Lakshmi
***********************************************************=
********************
Forum Note: Use "Reply" to post a response in th= e discussion
forum.
echo "select is_logging,is_buff_log from sysdatabases where
name='my_databasename';" | dbaccess sysmaster
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of LAKSHMI
DEVI PALANISSAMY
Sent: Friday, June 05, 2009 10:52 AM
To: ids@iiug.org
Subject: Checking the logging status of the database [15951]
Hi,
We are using the IDS 11.5 in RHEL 5.3 platform
I want to check the logging mode of the database. We are using the database in
the "No logging" and "Unbuffered" mode.
Is there any command available in IDS to check the logging mode?
Also i have used the utility "onmonitor", upon which on running gives the
message "Termcap entry too long, Segmentation Fault"
Any help is appreciated!
Thanks,
Lakshmi
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
select * from sysdatabases where name = 'mydatabasename';
Or get my utils2_ak package and compile the listdb7.ec utility then:
listdb7 -d mydatabase -D
$ listdb7 -d art -DThere is currently 1 matching database:
# Database/Table/Index/Owner DBSpace/Created Log/Lock Mode GLS?
=== ================================== =============== ============= ====
1 art
root data1
10/07/2008 NON-LOGGED No
Try setting TERM=vt100 to get onmonitor and dbaccess (in menu mode) to work.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Fri, Jun 5, 2009 at 11:52 AM, LAKSHMI DEVI PALANISSAMY <
lakshmidevip@hcl.in> wrote:
> Hi,
>
> We are using the IDS 11.5 in RHEL 5.3 platform
>
> I want to check the logging mode of the database. We are using the database
> in
> the "No logging" and "Unbuffered" mode.
>
> Is there any command available in IDS to check the logging mode?
>
> Also i have used the utility "onmonitor", upon which on running gives the
> message "Termcap entry too long, Segmentation Fault"
>
> Any help is appreciated!
>
> Thanks,
> Lakshmi
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5a9b11f9ab5046b9c47e0
Lakshmi,
I have an old script I use for IDS 7.3 and 9.4 - I am assuming it will still
apply to 11.5. It has one optional command line parameter - the name of the
database. If you don't provide a database name, it will return the logging
status of all databases in the current instance. Here it is:
--------------------------------------------------------------------------------
-------------
#!/usr/bin/ksh
#-------------------------------------------------------------------------------
# log_status.ksh
#-------------------------------------------------------------------------------
if [ "$#" -gt 0 ]
then
export WHERE_CLAUSE="where name='$1'"
else
export WHERE_CLAUSE=""
fi
export WORKFILE=/tmp/log_status.$$
echo "unload to $WORKFILE delimiter ' '
select name,is_logging,is_buff_log,is_ansi
from sysdatabases $WHERE_CLAUSE" \\\\
| dbaccess sysmaster >/dev/null 2>&1
cat $WORKFILE \\\\
| while read DBNAME LOG BUF ANSI
do
if [ "$LOG" = 0 ]
then
LOG_STATUS="N"
else
if [ "$ANSI" = 1 ]
then
LOG_STATUS="A"
else
if [ "$BUF" = 1 ]
then
LOG_STATUS="B"
else
LOG_STATUS="U"
fi
fi
fi
typeset -L18 DBNAME
echo "$DBNAME $LOG_STATUS"
done
rm -f $WORKFILE
--------------------------------------------------------------------------------
-------------
It's been a very long time since I worked with TERMCAP and TERMINFO - sorry I
can't help there.
Rob Schmitz
Embarq Data Management
rob.b.schmitz@embarq.com
www.embarq.com
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of LAKSHMI
DEVI PALANISSAMY
Sent: Friday, June 05, 2009 10:52 AM
To: ids@iiug.org
Subject: Checking the logging status of the database [15951]
Hi,
We are using the IDS 11.5 in RHEL 5.3 platform
I want to check the logging mode of the database. We are using the database in
the "No logging" and "Unbuffered" mode.
Is there any command available in IDS to check the logging mode?
Also i have used the utility "onmonitor", upon which on running gives the
message "Termcap entry too long, Segmentation Fault"
Any help is appreciated!
Thanks,
Lakshmi
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Art, I have tried setting the term to "VT220" and it worked fine. But i want to check with the single command to check the status. Is it possible? Thanks, Lakshmi
Thanks Art! Your database query has helped me! Regards, Lakshmi
Hi Rob,
I used the query "select name,is_logging,is_buff_log,is_ansi
from sysdatabases $WHERE_CLAUSE" \\\\
| dbaccess sysmaster >/dev/null 2>&1 " from your script and it worked out!
Thanks a lot!
Regards,
Lakshmi
I think this thread indicates the importance of becoming conversant with some of the not-so-familiar regions of the sysmaster database. Go on, go and play, get your feet wet when you have a spare bit of time; plenty of details in the Admin ref and on the iiug or c.d.i. I regularly do, it's mighty instructive.