I am able to connect to the Oracle9i server through network configuration tools -- network manager and testing the connection. I am getting the following result.
Initializing first test to use userid: scott, password: tiger.
Attempting to connect using userid: scott
The connection test was successful. But if I try to connect through the SQL*Plus, I get the ORA-12514: tns: service name could not be resolved. What might be the problem?
I have the following in tnsnames.ora
# TNSNAMES.ORA Network Configuration File: D:oracleora90networkadmintnsnames.ora # Generated by Oracle configuration tools. HPHIS.DIGITALINDIASW.NET = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dcnew4)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = hphis) ) )
When you try to connect through SQL*Plus, make sure you are using this form: sqlplus scott/tiger@HPHIS.DIGITALINDIASW.NET You may have to use the entire TNS alias. Also make sure that your TNSNAMES.ORA file is in the %ORACLE_HOME%networkadmin directory. If it is in a different directory, then make sure your TNS_ADMIN environment variable is set to the directory that contains this file.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.