FAQ
Posted in 1994
# Name : lmode
# Author : Tom Hogarty
# Program : Integrated script/awk program to read/format/output
# the current (row level) lock modes in a database.
# Syntax : lmode >>modes.sql
# ( update the new db calling [isql|dbaccess] <dbname> modes )
# call as user informix
>/tmp/tom
echo " select 'ALTER TABLE ', owner, tabname
from systables
where locklevel = 'R' " >/tmp/tom
# edit the following line
[isql|dbaccess] <dbname> - </tmp/tom |
awk '
$0 ~ /ALTER TABLE/ { tabname=hoch1$3hoch2$4
printf " %12s %24s %34s \\n",
"ALTER TABLE", tabname, " LOCK MODE (ROW) ; commit work ;"
} ' hoch1=\\" hoch2=\\".
----snip here ----------------------------------------------------------------
Hope this helps
Tom Hogarty Usual Disclaimers apply Online 5.01.U
SNI ----------------------- RM600, RM400, MXI
Paderborn Phone: 049-5251-8-11602 Sinix, Sco etc.
Germany Fax : 049-5251-8-11599 (Online 6.0 on desk)