1

I'm getting the error message below when trying to connect to database in the Data Block Wizard (in Oracle Form Builder):

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

In order to fix that, I set the TNS_ADMIN environment variable to the directory path where the tnsnames.ora file exists. In addition, I have changed the tnsnames.ora file content like so:

DEV = (DESCRIPTION =(ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)
          (HOST = localhost)(PORT = 1521)))
          (CONNECT_DATA = (SID = DEV)))

However, I still get the same error message. Any idea how to fix that?

Littlefoot
  • 131,892
  • 15
  • 35
  • 57
Nadim
  • 382
  • 1
  • 7
  • 29

1 Answers1

0

You're trying to base data block on a table that resides in another database, so you're accessing it via a database link. Correct?

If so, create a synonym (that points to that table) in your own schema, and then base data block on that synonym.

Littlefoot
  • 131,892
  • 15
  • 35
  • 57
  • I'm actually not aiming to base data block that way. I was just trying to connect to a database after selecting it in the Data Block Wizard. This is the tutorial I was actually following: https://www.youtube.com/watch?v=mv8jgD1I_Ug&list=PLGfV_goH6Dpz1TWMOypRILJ1LbaBAbtxk&ab_channel=Dr.GirijaNarasimhan You can go directly to 2:00 in the timebar and see how it works. You see what I mean? – Nadim Feb 10 '22 at 21:55
  • 1
    Aha. It has nothing to do with *data blocks*; you'd get the same if you tried to establish connection right after you started Oracle Forms. TNSNAMES.ORA you posted suggests that database is installed on your own PC (i.e. localhost). Is that correct? Can you connect to it using SQL*Plus? – Littlefoot Feb 11 '22 at 06:07
  • Indeed! the database was installed on localhost. When running the following command line: `sqlplus user/password@dev`, I get this error message: ORA-12505: TNS:listener does not currently know of SID given in connect descriptor – Nadim Feb 11 '22 at 14:55
  • It looks as if there's something wrong with the database itself. I'm not a DBA so I can't help much, unfortunately. – Littlefoot Feb 11 '22 at 17:34