1 Reply Latest reply on Mar 20, 2013 4:25 PM by Gary Graham-Oracle

    tnsnames file issues

      Ok, here is my issue.

      I'm able to connect to my Oracle database using SQL Developer when I enter in

      Connetion Name: myDatabase
      username: uuid
      password: pwd

      Connection Type: Basic
      hostname: myOracleServer
      Port: 1521
      SID: orcl

      now, I'm trying to connect to that same database but using the TNSNAMES.ora file, however, I keep getting error messages
      [TNS listener was not given the SERVICE_NAME in CONNECT_DATA]

      my TNS file looks like this:

      myDatabase =
      (ADDRESS = (PROTOCOL = TCP)(HOST = myOracleServer)(PORT = 1521))
           (SID = orcl)


      what am I missing? I really need to connect to this Database from another source (SSIS), so I need to get this working, but I'm not sure what I"m missing. I googled but nothing appears to be working for me.

      My TNS file is located in the following folder: c:\app\username\product\11.2.0\client_1\Network\Admin

      [it appears that this is the only forum I can post into for whatever reason, so if this is the wrong forum, go ahead and place it in the correct one                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
        • 1. Re: tnsnames file issues
          Gary Graham-Oracle

          Regarding SQL Developer and TNS, having multiple tnsnames.ora files (even with different file types, as in backup copies) can cause problems. The solution for that specific situation is use
          Tools -> Preferences -> Database -> Advanced -> Tnsnames Directory
          to point at the desired directory while at the same time removing any backup copies there.

          If the problem is with the listener configuration or the tnsnames.ora itself, then you are correct -- this is not an appropriate forum. Having a forum username, you should be able to login and post in any of these Oracle public forums. For example, here is a post on the same topic from the Oracle Database -> General Questions forum:
          TNS:listener was not given the SERVICE_NAME IN connect_data

          Hope this helps,