windows service connecting to Oracle

  • Thread starter Thread starter rishaan
  • Start date Start date
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
*-----------------------*
 
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
 
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
 
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
 
Back
Top