Setting up ODBC Query

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
isabelle2378
Posts: 3
Joined: Wed May 11, 2005 3:36 pm

Setting up ODBC Query

Post by isabelle2378 »

Hi,

I am trying to setup an ODBC Query to run a sql statement and if it returns anything other than 0, send an alert. The query is:
select count(*) from ord_mast where status='SHIP'and upld='N'
and trunc(status_dt)<trunc(sysdate). When I try and test it, I get the error:
Error 4294967295[Microsoft][ODBC driver for Oracle]Error in Column1: Numeric value out of range.
When I do not have 'Alert when field in' checked and test, the query runs okay. But when I check that and have 1 row 1 column is>than "0", I get the error. What am I doing wrong?

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

Post by KS-Soft »

Looks like ODBC driver does not recognize data (number) returned by SQL Server.
You are using [Microsoft ODBC driver for Oracle]? Try to use [Oracle ODBC driver] instead

Regards
Alex
isabelle2378
Posts: 3
Joined: Wed May 11, 2005 3:36 pm

Still getting an error

Post by isabelle2378 »

Hi,

I installed the ODBC drivers from Oracle 9i Rel2, setup a new dsn and tested it and it was able to connect successfully. I went back into Hostmon and changed it to use the new dsn and now I'm getting this error:

Error 4294967295:[Microsoft][ODBC Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_ENV failed.

The database that the query is being run against is Oracle 9.2.0.1.0 and now it won't even run the query when I try and test. Is there a specific Oracle ODBC driver that I'm supposed to use or is the 9i one okay?

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

Post by KS-Soft »

May be your problem described here: http://groups.google.ca/group/comp.data ... e14c1c5530
Explanation:

If you install Oracle9i Release 2 (9.2.0.1) on a computer running
Windows with an NTFS partition, the contents of ORACLE_HOME directory
will not be visible to users who are authenticated on that machine.
These permissions were not set properly when the software was
installed.
There is solution provided by Oracle Support, please visit above link

Regards
Alex
isabelle2378
Posts: 3
Joined: Wed May 11, 2005 3:36 pm

ODBC errors

Post by isabelle2378 »

Hi,

I uninstalled Oracle 9i and reinstalled it with the user that has permissions to the application. Now when I try and do a test, it comes back with:
Error 4294967295 Specified driver could not be loaded due to system error 127 (Oracle in Oracle 9i).

When I look up this error, it states:
Setup the PATH to first search the ORACLE_HOMEbin related to the Oracle ODBC Driver

set PATH=%ORACLE_HOME%bin:%PATH%

I come from a Unix world and I'm not to familiar with the path variables for Oracle in Windows. Is this PATH variable set in the registry? I see a path setting in the Oracle section and it's set to the ORACLE_HOME. Any ideas?

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

Post by KS-Soft »

You may click right mouse button on "My Computer" -> select "Properties" menu item -> go to "Advanced" tab -> and click "Environment Variables" button.
Here you may setup PATH variable for current user and system variable (necessary when HostMonitor is running as service!)

Regards
Alex
Post Reply