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:
- In Oracle Forms builder, click on the File menu and then click Connect option.
- Then in the Connect window, provide the username in the Username field.
- Provide password in the Password field.
- In the Database field, provide the information using the format IP-Address:Port/OracleSID. For example, 123.456.78.9:1521/ORCL.
- Then click on the connect button to connect the database.
Connect in Oracle Forms 10g Using TNSNAMES.ORA file
- Open My Computer and go to the Oracle Forms 10g home folder. For example, C:\DevSuiteHome_1.
- Then open the folder network\admin folder.
- 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).
- Then create a TNS entry in the tnsnames.ora file as shown below.
- 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
- 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.
- There you will find the tnsnames.ora file.
- 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.
- Then connect as mentioned in the point 5 above.