By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,024 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,024 IT Pros & Developers. It's quick & easy.

Oracle 9i & Windows Service Program Error

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a

"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.