469,621 Members | 1,844 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

Oracle 9i & Windows Service Program Error

MAL
Hello,

I have 2 classes that work great as a windows app to retrieve and
process data from an Oracle9i db. When I implement them in a Service
program running as Local System, it fails on the .open. I am using
OLEDB for Oracle 9.2.0.4. I have verified the Oracle Client install,
Local Sys' path variable, and followed MSKB article 259959(Debugging
connectivity issues w/ Oracle).

Here is the error:
Error #1
Message: Oracle error occurred, but error message could not be
retrieved from Oracle.
NativeError: 0
Source: Microsoft OLE DB Provider for Oracle
SQLState:

Connection string:
conn.ConnectionString = "Provider=MSDAORA;Persist Security
Info=false;Password=TIGER;User ID=SCOTT;Data Source=DATA1;

Can anyone point me to an example of Oracle DB access in a windows
service program?

Any help is appreciated. Thanks in advance.
Nov 20 '05 #1
1 2839

"MAL" <ir*************@hotmail.com> wrote in message
news:a2**************************@posting.google.c om...
Hello,

I have 2 classes that work great as a windows app to retrieve and
process data from an Oracle9i db. When I implement them in a Service
program running as Local System, it fails on the .open. I am using
OLEDB for Oracle 9.2.0.4. I have verified the Oracle Client install,
Local Sys' path variable, and followed MSKB article 259959(Debugging
connectivity issues w/ Oracle).

Here is the error:
Error #1
Message: Oracle error occurred, but error message could not be
retrieved from Oracle.
NativeError: 0
Source: Microsoft OLE DB Provider for Oracle
SQLState:

Connection string:
conn.ConnectionString = "Provider=MSDAORA;Persist Security
Info=false;Password=TIGER;User ID=SCOTT;Data Source=DATA1;

Can anyone point me to an example of Oracle DB access in a windows
service program?


There are several things left out of that article. If the program works in
a desktop app, but not in a service then the problem is one of two things:
Secutiry or Environment.

Security:

A service runs in a different security context. Change the service login to
be your interactive login to test if it is a security issue. If it is, give
the service account rights to the [Oracle Home] directory.
Environment:

Every processes inherits its environment from its parent process. The
parent process for a service is the Service Control Manager. The
environment for the Service Control Manager is a snapshot of the environment
at bootup, and cannot be changed without rebooting.

Several environment variables affect the Oracle Client. Most important is
the PATH. If the [Oracle Home]\bin folder is not in the path, then you
cannot load OCI.DLL.

This one is simple to fix. Make sure the environment is correct in Control
Panel>System> Advanced and then reboot.

David
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wayne Happ | last post: by
3 posts views Thread by Jake McDermott | last post: by
1 post views Thread by Artur Kowalski | last post: by
13 posts views Thread by Chris Botha | last post: by
5 posts views Thread by Rob R. Ainscough | last post: by
1 post views Thread by megaman1 | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.