Database Error Messages

TNS-12154

Cannot connect to database. Cannot find alias alias_value in repository_loc.
  • alias_value: The alias or connect identifier that is used.
  • repository_loc: The naming method repository or the repository that cannot be located or reached.

Cause

A connection to a database or other service is being requested using a connection alias but the alias specified cannot be resolved into a connect descriptor using one of the configured naming methods.


Action

Do the following:

  • Check for mistakes in the connection string that you used.
  • If you have a sqlnet.ora file containing a NAMES.DIRECTORY_PATH parameter, then ensure that the parameter contains valid values.
  • If you are using an alias from a tnsnames.ora file:
  • Verify that the tnsnames.ora file exists, is in the proper directory, and is accessible.
  • Ensure that the alias exists in one of the tnsnames.ora files.
  • Ensure that there are no syntax errors anywhere in the tnsnames.ora file or files. Look for unmatched parentheses or stray characters. Ensure that magic quotes are not used.
  • If you are using LDAP directory naming:
  • Verify that the net service name or database name used as the connect identifier is configured in the directory.
  • Verify that the LDAP directory server is up and that it is accessible.
  • Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier.
  • If the error is for a dblink connection, check all of the above for Database Server process making connection to remote database.