Search code examples
oracle-databaseoracle12ctnsnames

How to see all connector identifiers?


I'm following environment setup guide for my project and there is .bat file with following commands:

sqlplus system/oracle@demo12c @keystorecreate.sql

I'm getting the following error after running the file:

ORA-12154: TNS:could not resolve the connect identifier specified

How to see all connection identifiers to see which one I can use?


Solution

  • demo12c is alias of the database you're connecting to. You should find its entry in the TNSNAMES.ORA file. I don't have 12c version, but - in prior versions - it is (by default) located in the \network\admin directory. For example, for 11gXE, it is something like this:

    C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
    

    I presume Oracle didn't change that, so - have a look.

    It appears that you won't find demo12c in there. Review the steps described in the environment setup you mentioned; it should mention it, somewhere.

    By the way, have you already installed the database? No problem if all of you use the same copy of the database, while each of you has his/her own schema to work with (schema = user and all its objects; it is identified by its name ("username") and a password - the first two parameters you used in the connect string).