windows service connecting to Oracle

R

rishaan

The module to connect to Oracle works fine for the vb.net application
but not for vb.net windows service..
Gives error..TNS service name could not be resolved. Ora12154.

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
M

Miha Markic [MVP C#]

Hi,

It is probable that windows account under which service is running doesn't
have enough NTFS privileges (read) on folders where Oracle is installed
 
E

Eric

Hello rishaan,
The module to connect to Oracle works fine for the vb.net application
but not for vb.net windows service..
Gives error..TNS service name could not be resolved. Ora12154.

The other posters are right - it's clearly related to your account.

One additional bit of info - starting with the 9i client you have to make sure the user account has NTFS permissions to the Oracle client directories, also. They lock it down during the install, so only the admin account who installed the client will have privs to those folders. You have to add any other account to the NTFS security yourself.

Eric
 
R

Roy Fine

rishaan

are you sure about the claim that:

"The module to connect to Oracle works fine for the vb.net application but
not for vb.net windows service" -

Specifically, the error that you reported indicates that the Net8 services
found the tnsnames.ora file, but could not resolve the alias specified in
the connection string from the entries in the tnsnames.ora file. Given that
Net8 services found the tnsnames.ora file suggests that oraclient9.dll was
loaded, ergo the service account has at least read and execute permissions
on $ORACLE_HOME/bin directory.

otherwise - consider the following:
1) check the connection string and make sure that the alias is correct -

2) make sure that there are no duplicate tnsnames.ora files around,
especially none in the directory that contains the service exe.

3) have a look at note 114085.1 in http://metalink.oracle.com

regards
roy fine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top