Well, I don't know if this will help or not. The short answer is that
you need to upgrade your server code.
At 3.1.2.20 on AIX, I had a frequent problem with queries hanging. As I
recall there was not a lot of consistency in which queries would hang,
and no good way to prevent it. May or may not apply to your situation.
Some of the hangs are documented in the README for the 3.7.x server, in
the "apars fixed" section.
Hangs are most likely to occur when there is a lot of data base activity
-other queries, DELETE FILESPACE commands, EXPIRE INVENTORY commands,
large SELECTS. If you can schedule your script to run so that it
doesn't compete with any of those, it may help. But it may not - there
were also cases where something simple like a Q PROCESS could hang it,
too. And at 3.1.2.xx, we couldn't do a SELECT on the CONTENTS table
EVER without a hang!
If you can check the server activity log carefully, you can usually see
which query was the last to be issued. It may or may not help you to
know exactly which query is hanging, depending on which query, you might
be able to write it differently.
Try this:
If you think the script is hung, enter this command: Q SESSION F=D
Look at the session numbers. Hung queries will just sit there for ages,
while other backup/restore sessions will come and go. If you see a
session with a very low number, that is probably the hung one. If you
cancel it, it may free yours up. If the ancient query is yours, it's
hung and isn't going to free up. We even had cases where the only way
to free things up was to bounce the server.
There is a SHOW LOCK command that Tivoli support could track through and
tell you exactly what is hung waiting on what. However, 3.1.2.20 is
about to go out of support (Jan. 31, I believe), and THE ONLY FIX is to
upgrade the server code, anyway, so you would probably be better off
pursuing that. I'm at 3.7.2 now, and we see this type of problem much
less frequently.
-----Original Message-----
From: Kai G Hintze
To: [EMAIL PROTECTED]
Sent: 1/26/01 2:27 PM
Subject: dsmadmc query in loop hangs
I have a script that loops through a list and issues some queries. It
runs
fine for a while, then hangs. Anyone willing to help me figure out why?
Environment is
ADSTAR Distributed Storage Manager
Command Line Administrative Interface - Version 3, Release 1, Level 0.0
(C) Copyright IBM Corporation, 1990, 1997, All Rights Reserved.
Session established with server DUBLIN01: AIX-RS/6000
Server Version 3, Release 1, Level 2.20
running on aix 4.1.5, using perl 5.005_03.
The goal is to "Audit Volume" all the volume in the library. We had some
drive
problems, and suspect some tapes may be damaged, but we don't know which
ones.
The general outline is:
create a list of all volumes in the library
loop through the list
#this is supposed to be low priority, so:
wait until no session is in MediaW state
wait until no audit volume proccess is running
wait until at least 25% of the drives in the library are available
# conditions are ok to run another audit
submit audit volume
sleep 3 hours while the audit volume runs
endloop
The actual script is about 600 lines, so I'll mail it to anyone
interested,
but I didn't want to inflict it on the whole mailing list.
It seems that it runs for a while, then just stops in one of the queries
where
I am checking for conditions ok.
Thanks for any suggestions.
Kai.
"There are two types of people who will tell you that you cannot make a
difference in this world: Those who are afraid to try themselves, and
those
who are afraid that you will succeed." -- Ray Goforth