+ Reply to Thread
Results 1 to 3 of 3

ORA-12154 TNS Could Not Resolve Service Name

  1. ORA-12154 TNS Could Not Resolve Service Name

    ORA-12154 is an error generated by the oracle network layer. This TNS message is thrown during the logon process to a database. This error indicates that the communication software in Oracle ( SQL *Net or Net8 or equivalent ) did not recognize the host/service name specified in the connection parameters. This error almost always indicates a misconfiguration of the oracle tns entries

    ORA-12154 : TNS : could not resolve service name

    ORA-12154 error is thrown during the logon process to a database. This error indicates that the communication software (TNS) in Oracle ( SQL *Net or Net8 ) did not recognize the host/service name specified in the connection parameters.

    For a database name to be recognized, it must be resolved by Oracle Client. To resolve a name, Oracle client uses either a TNSNames.ora, A Directory Server or an Oracle Names Server. This error most likely indicates that the resolution is not working and that there is an error in the TNSNAMES.ORA or SQLNET.ORA. For database connectivity to work your database name has to be entered into the TNSNAMES.ORA at a minimum to make this work. In case you are using a directory or names server, we recommend that you check your sqlnet.ora file.

    To fix the ORA 12154 error:

    Check that the instance or database name is being typed in correctly. It is sometimes also referred to as the connect string of the database

    Check the tns names.ora file to validate that the instance name has been entered correctly. If you are in Unix, validate that there are no control characters at the end of the instance or database name and that all paranthesis around the tns entry are properly terminated

    If everything looks good in tnsnames.ora, validate that the domain name entry in sqlnet.ora is not conflicting with the full database name resolution.

    If you are unable to find a solution, best practice is to delete and recreate the TNS entry to eliminate any character or control character issues.

    If the entry you are looking for in your tnsnames.ora is missing, use the following procedure to add a new entry using the SQL*Net Easy configuration utility.

    Start>Programs>Oracle >SQL Net Easy Configuration.
    Select the option to Add a new instance alias.
    Enter the parameters are required in the forms. If you do not have this information, contact your dba.
    Confirm the new entry.
    Repeat for as many aliases as needed.

    ORA-12154 Tips :

    Most tnsnames issues arise out of multiple oracle homes, incorrect entries made somewhere in the file etc.

    1. Try searching the drive to identify how many tnsnames.ora files you have

    2. Try renaming the tnsnames.ora file in the oracle home where you are facing the issue and add just the entry you are having an issue with. If it works, you know that the issue is somewhere else in the file.

    3. Use a centralized naming service to avoid most issues with client connectivity and the generation of ORA-12154 errors.
    Last edited by oracle-dba; 05-17-2011 at 03:22 AM.

  2. Re: ORA-12154 TNS Could Not Resolve Service Name

    One unique situation that a user reported on OTN...

    ORA-12154 is caused by the fact that the user's password contained an '@' character. Please validate that special characters in your username or password are not causing the issues like they were reported in the url below.

    https://forums.oracle.com/forums/thr...61700&tstart=1

  3. Re: ORA-12154 TNS Could Not Resolve Service Name

    Quote Originally Posted by oracle-dba View Post
    One unique situation that a user reported on OTN...

    ORA-12154 is caused by the fact that the user's password contained an '@' character. Please validate that special characters in your username or password are not causing the issues like they were reported in the url below.

    https://forums.oracle.com/forums/thr...61700&tstart=1
    ORA-12154 : Another known issue..

    OCCI 10g is not supported with VS 2010. You need to upgrade to 11.2.0.2.

+ Reply to Thread