ODBC Query results in "Invalid Cursor state"

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
jesper
Posts: 4
Joined: Wed Apr 10, 2002 6:00 pm
Location: Denmark
Contact:

Post by jesper »

Hi !

I am testing the following setup :
- Hostmon 3.02 beta
- Tivoli Storage Manager ODBC Interface 4.2.1.20
- Tivoli Storage Manager f. AIX 4.1.15

The ODBC interface works fine - I have tested it with MS-Access and other programs.

The SQL script is VERY simple :

select log.PCT_UTILIZED from log

This statement return only one row since there are only one record in the database.

But when HostMon I get the following error message - "Invalid Cursor State". This happens if I ask for the first row in the first column.

If I ask for the second row in the first column I get "There is no information about this table".

This is what it looks like from TSM's point of view :

ANR0407I Session 135870 started for administrator WHMANAGEMENT
04/11/02 08:32:24 ANR0407I Session 135871 started for administrator WHMANAGEMENT
04/11/02 08:32:24 ANR2017I Administrator WHMANAGEMENT issued command: DEFINE
CURSOR C9e3af2c SQL="select PCT_UTILIZED from log"
04/11/02 08:32:24 ANR2017I Administrator WHMANAGEMENT issued command:
DISPLAY CURSOR C9e3af2c
04/11/02 08:32:24 ANR2017I Administrator WHMANAGEMENT issued command: OPEN CURSOR C9e3af2c
04/11/02 08:32:24 ANR2017I Administrator WHMANAGEMENT issued command: FETCH NEXT 50
04/11/02 08:32:24 ANR0405I Session 135870 ended for administrator WHMANAGEMENT

I really hope someone can help me solve this one !


KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Jesper,

It looks like HostMonitor execute SQL query but cannot properly position cursor.
I made several changes in code, please, try the patch http://www.ks-soft.net/download/hm304.zip
Unfortunately we don't have Tivoli Storage Manager and I cannot test HostMonitor with this ODBC driver.

Regards
Alex
jesper
Posts: 4
Joined: Wed Apr 10, 2002 6:00 pm
Location: Denmark
Contact:

Post by jesper »

Hi Alex !

Thank you for your quick reply :smile:

I have installed your patch - but it did not help much.

I can send you the ODBC driver and give you access to one of our TSM servers via the internet. That way you would be able to try it out for yourself. Would that be an idea ?


KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

jesper,
Patch did not help much, but something changed? Does patch always display error "There is no information about this table"?
I like your idea about access to database. I think better send all information by e-mail to line1@ks-soft.net. Right now I am far from the office (I will back in next Friday) but I can make some tests from my laptop.

Regards
Alex
simonl
Posts: 49
Joined: Wed Apr 03, 2002 6:00 pm
Contact:

Post by simonl »

I need your help. I'm using odbc query test to get some blocked processes from MS Sql Server database. This is a statement which selected all blocked processes: "SELECT count(*) FROM master.dbo.sysprocesses with (NOLOCK) where (dbo.sysprocesses.blocked > 0)". When I specify criteria from HostMonitor like "is <> then 0" or any other and run test I got query completed but when I applied and closed HM and open again it's come back to default criteria "is < then". I do not get any alerts actually from that test because criteria are not right.

Thank you.
Simon.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

This problem fixed in latest version (version 3.12 just uploaded on site)
http://www.ks-soft.net/hostmon.eng/downpage.htm

Regards
Alex
simonl
Posts: 49
Joined: Wed Apr 03, 2002 6:00 pm
Contact:

Post by simonl »

Thank you a lot.
Locked