¤ I am trying to connect to Oracle 9i Database from Windows Service. This is the connection string :
¤ User ID = ...;Password = ...;Data Source = ...
¤
¤ And I am getting an error:
¤
¤ "ORA-12154: TNS:could not resolve service name\n"
¤
¤ I tried changing Windows user name under which the service is running,
doesn't help. Also when I run the same code from Windows Forms application
everything works OK. I can connect to this server using SQL+. I am using
..NET Framework 1.1
¤ Please help.
This would indicate to me that the account under which your service is running cannot see the
tnsnames.ora configuration file.
Nope - it indicates that the instance identified by the SERVICE_NAME
parameter in the tnsnames.ora file was not found by the listener server
runnning the machine identified by the HOST parameter.
this from OTN:
ORA-12154: TNS:could not resolve service name
Cause: Oracle Net could not locate the net service name specified in the
tnsnames.ora configuration file.
Action: Perform these steps:
1.. Verify that a tnsnames.ora file exists.
2.. Verify that there are not multiple copies of the tnsnames.ora file.
3.. In the tnsnames.ora file, verify that the net service name specified
in your connect string is mapped to a connect descriptor.
4.. Verify that there are no duplicate copies of the sqlnet.ora file.
5.. If you are using domain names, verify that your sqlnet.ora file
contains a NAMES.DEFAULT_DOMAIN parameter. If this parameter does not exist,
you must specify the domain name in your connect string.
6.. If you are not using domain names, and this parameter exists, delete
it or disable it by commenting it out.
7.. If you are connecting from a login dialog box, verify that you are not
placing an "@" symbol before your connect net service name.
8.. Activate client tracing and repeat the operation.
Cause: Oracle Net could not locate the database service name or net service
name specified in the directory server.
regards
roy fine