ODBC Tests

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
Guest

Post by Guest »

I am trying to compare data on 2 seperate databases. Would it be possible to take the result of one ODBC test, and use an HM script to make it the parameter on another ODBC test?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Truth to say I don't see how to implement this in HostMonitor. I think you can use your SQL server, create some stored procedure to compare databases.

Regards
Alex
Guest

Post by Guest »

Here is how I have it working today;

ODBC Query 1 - Gets count of records from Table on Server A. (I have this same test for the different servers). Server Z has a database with a table on it which has columns for Server Name, and Result. The baseline entry is manually entered. On Good tests, I have it execute an SQL Query which updates a table on Server Z with the Server name and reply value.

ODBC Query 2 - Reads the table on Server Z and looks for servers who have a different record count than the baseline entry.

Rather than use Server Z as a "middleman", would it be possible in the future to execute an HM script which can dynamically update the search criteria on the individual tests?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

So, you need command to change SQL Query for some test? Like:
SetTestParam ODBC_test_#2 SQLQuery "select field1 from table2 where field2=%Reply%"
Guest

Post by Guest »

Not necessarily the query itself, but the result condition that it's looking for. I'm counting the records in a table. If the count is > than 0, the response is good. I then update the table on Server Z with the reply as a "good status action". Rather than update the table on Server Z, I'd like to have it update the test parameters on the other test(s) to say <> %reply% is bad, where %reply% was the result of the baseline.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Truth to say its more easy to implement command to change SQL query than command to change check condition. So, if command to change SQL Query will fit your needs, it can be done in next update.

Regards
Alex
Guest

Post by Guest »

I can make that work too.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Ok, will be implemented in next version. I think it will be available on next week.

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

Post by KS-Soft »

Ok, update available at http://www.ks-soft.net/download/hm353.zip
You can use command: SetTestParam test_name SQLQuery your_sql query

But... in this version was redesigned TCP and NT Event Log tests. They works but testing is not finished. So, use this update at your own risk or wait for new release

Regards
Alex
Guest

Post by Guest »

Works great! Thanks!
Locked