How to log users off before dbexport from cron
Posted in 1999
Topics: Performance & Tuning, Server Administration, Migration, Import/Export & Data Conversion, Platform-Specific Issues
As part of our overnight jobs we export all our databases to a safe location
on disk. My script to do this first shuts down Online (Version 7.22 on HP-UX
10.2) using onmode -ky, as the dbexport command will fail if there are still
users running oninit processes. I have two questions:
1. Is it wise to shut down Informix so frequently - can this have a
detrimental effect on performance in that routines that would be read from
cache in an up and running system have to be read from disk the first time
they are executed?
2. How can I identify Informix processes running under user IDs and
terminate them safely and cleanly - I could do this with UNIX script but
I'd be happier if there was a tried and tested Informix utility?
Thanks in anticipation
Graeme Muirhead
csi@g.muirhead.freeuk.com
I use script like this: (IDS 7.1 UC1 for SCO UNIX)
seslist=`onstat -g ses`
echo "$seslist" |
(
line >/dev/null
line >/dev/null
line >/dev/null
line >/dev/null
line >/dev/null
while true
do
pid=`line`
if [ $? -eq 1 ]
then
break
fi
set $pid
if [ $5 != '-' ]
then
onmode -z $1fi
done
)
Graeme Muirhead <g.muirhead@freeuk.com> '''''''' ' ''''''
<MFmp3.12779$ts3.362835@nnrp4.clara.net>...
> As part of our overnight jobs we export all our databases to a safe
location
> on disk. My script to do this first shuts down Online (Version 7.22 on
HP-UX
> 10.2) using onmode -ky, as the dbexport command will fail if there are
still
> users running oninit processes. I have two questions:
>
> 1. Is it wise to shut down Informix so frequently - can this have a
> detrimental effect on performance in that routines that would be read
from
> cache in an up and running system have to be read from disk the first
time
> they are executed?
>
> 2. How can I identify Informix processes running under user IDs and
> terminate them safely and cleanly - I could do this with UNIX script but
> I'd be happier if there was a tried and tested Informix utility?
>
> Thanks in anticipation
>
>
> Graeme Muirhead
> csi@g.muirhead.freeuk.com
>
>
>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think shutting down informix to single user (onmode -su) is better then
killing users manually. For several reasons:
1. sometimes there are non-terminal sessions, that most scripts can't
kill without killing main threads
2. on some OSs (noteably SCO Unix 5.0.[4,5]) shutting down informix to
off-line when there are still active users might cause problems if the
application using informix was not shutdown/killed.
we use (onmode -su) on several OSs and did not encounter any problems (yet
:-)
Best,
Nir
- --
Nir Levy Email: nlevy@shaked.co.il
System Administrator Phone: +972-3-5797551/5789536
Shaked Computer Systems Ltd. Fax: +972-3-5703705
http://www.shaked.co.il/~nlevy
> >... on disk. My script to do this first shuts down Online (Version 7.22
> >on HP-UX
> > 10.2) using onmode -ky, as the dbexport command will fail if there are
> > still users running oninit processes. I have two questions:
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>
iQA/AwUBN6aAWdBe37AVcjAxEQK3NwCdEVZkju/iLZNtTNKupbpD1Q0yyyUAnit1
OEMcffrALwMV5oMxmWX+PO44
=n1uO
-----END PGP SIGNATURE-----
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g