Ability to use User Defined Variables (udv) in ODBC SQL

Need new test, action, option? Post request here.
Post Reply
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Ability to use User Defined Variables (udv) in ODBC SQL

Post by timn »

Came across a case where it would be handy to specify a user defined variable (%udv_xxxx%) in the "Execute SQL query" text box of the ODBC SQL test dialog.

I have 12 SQL servers where the query I want to run is identical on each machine. The query itself may change from time to time but it will always be identical for all 12 machines.

Thus, if I could define %udv_MyQuery% as "SELECT Count (*) ..." I would only have to change it in one location.

Not a huge deal - it might be tricky to distinguish between a UDV and a SQL text search pattern (i.e SELECT...WHERE somefield LIKE '%BOB%')
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Just upgrade to version 4.16 :-)
http://www.ks-soft.net/hostmon.eng/news.htm

Regards
Alex
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Post by timn »

Alex:

Aha. I discovered the problem. I was running 4.16 but what I was doing
was pressing the TEST button in the lower right corner of the "ODBC SQL Test" dialog.

Packet sniffer shows that when TEST button is pressed, the UDV name is being passed untranslated on port 1433 to the SQL server (i.e. "%udv_sqljoblogquery%" ).

However, if I save the test, then refresh, packet sniffer shows the translated UDV value is passed (i.e. "SELECT COUNT(*) ..."),

Thus the test works fine, but the 'test of the test' does not because the UDV is not being translated.

I don't know if this is a 'bug' per se, but thought I should pass it along.... :wink:
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You are right. Will be fixed in next version.

Regards
Alex
Post Reply