Press "Enter" to skip to content

How to Connect Database in Oracle Forms Builder (10g / 11g)?

You can connect database in Oracle Forms builder using TNS (tnsnames.ora file) and by using the direct method (without tnsnames.ora file). The direct way is same for Oracle Forms 10g and 11g and even for 12c. But using TNS, a little difference is there between Oracle Forms 10g and 11g. Below is the explanation for both the methods.

Connect Database Using The Direct Connection Method

This method works with all the versions of Oracle Forms builder above 6i. The steps are as following:

  1. In Oracle Forms builder, click on the File menu and then click Connect option.
  2. Then in the Connect window, provide the username in the Username field.
  3. Provide password in the Password field.
  4. In the Database field, provide the information using the format IP-Address:Port/OracleSID. For example, 123.456.78.9:1521/ORCL.
  5. Then click on the connect button to connect the database.

Connect in Oracle Forms 10g Using TNSNAMES.ORA file

  1. Open My Computer and go to the Oracle Forms 10g home folder. For example, C:\DevSuiteHome_1.
  2. Then open the folder network\admin folder.
  3. There you will find a tnsnames.ora file. But if you don’t see the file then open the folder Sample inside Admin folder and copy the file from there to the outside of the sample folder (means in Admin folder).
  4. Then create a TNS entry in the tnsnames.ora file as shown below.
tnsorcl=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=YOURIP)(PORT=1521))(CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=orcl)))
  1. Change the highlighted values with your values. Then connect the Oracle Forms builder using the tnsorcl TNS name. For example, username/[email protected]tnsorcl.

Connect in 11g, Using TNSNAMES.ORA File

  1. In My Computer, go to the Oracle Forms 11g home folder and then open the asinst_1\config folder. For example, if your Oracle form’s home is C:\Oracle\Middleware2 then C:\Oracle\Middleware2\asinst_1\config.
  2. There you will find the tnsnames.ora file.
  3. Then create a TNS entry as I mentioned above for Forms 10g. Because TNS entry format is same for both the versions. The difference is in the path only.
  4. Then connect as mentioned in the point 5 above.

See also: