115 pts.
 Database connectivity from Oracle Forms
We are having a legacy running running on Oracle Forms and Reports. I want to change the database connection to point to a different database, how do I do that? P.S: I am pretty new to forms and reports

Software/Hardware used:
ASKED: May 7, 2009  9:17 AM
UPDATED: April 18, 2012  5:34 AM

Answer Wiki:
When you connect your forms to the database, you specify a database alias, which is an entry in your TNSNAMES.ORA file. You need to create an entry for the new database in your TNSNAMES.ORA, and then use that alias as the host string when connecting. HARSH:-- i would like to improve this answer a bit... IN VERY SIMPLE TERMS. TRY TO INSTALL ORACLE FORMS AND ORACLE 9i IN DIFFERENT DRIVES.... THEN YOU WILL BE HAVING TWO TNSNAMES.ORA FILES.. 1. FOR ORACLE 9i IN NETWORKADMIN DIRECTORY 2. FOR FORMS IN NETWORKADMIN DIRECTORY...(IN RESPECTIVE DRIVES) THEN WHAT YOU NEED TO DO IS ...OPEN BOTH TNSNAMES.ORA SIMULTANEOUSLY DOR EASY REFERENCE... IN FORMS--TNSNAME'S FILE THERE WILL BE ONLY ONE ENTRY BY THE NAME "EXTPROC_CONNECTION_DATA"....WHILE IN ORACLE 9i-TNSNAME FILE THERE WILL BE MANYU ENTRIES... WHAT YOU NEED TO DO IS IN ORACLE-9i FILE IS LOOK FOR A DATABASE ALIAS WITH THE NAME OF THE DATABASE WHICH YOU MENTIONED AT THE TIME OF INSTALLING ORACLE 9i i.e. the SID which you mentioned LETS SAY (TEST1)... then copy that complete set into FORMS TNSNAMES FILE... SAVE IT...AND YOU ARE DONE NOW GO TO FORMS... SCOTTTIGER AND THE DATABASE NAME=TEST1 AND YOU ARE DONE... IF ANY ISSUES MAIL ME AT er.harshpreetsingh@gmail.com
Last Wiki Answer Submitted:  March 30, 2011  7:45 am  by  carlosdl   63,580 pts.
All Answer Wiki Contributors:  carlosdl   63,580 pts. , Ms123   115 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Comments by Ms123:

“then use that alias as the host string when connecting.” – this is the part I do not understand. I am comfortable with the TNSNAMES part, as that is the standard connectivity configuration that I make for using db connectivity from other applications. But connecting from within the forms using the host string, this is what I cannot figure out. I don’t know how to find the connectivity definition in the forms. Is it within the login form or in a library? I know that this depends on how the application has been built, but I want to know what the practise is in general, and the places that I will need to be looking to find out the host string.

Thanks in advance for all your help.

 63,580 pts.

 

You should look for a call to the LOGON built-in (assuming that you are on 6i: Program->Find and replace PL/SQL…).

Also, check if the forms have an ON-LOGON trigger, and if so, see what is in there.

 63,580 pts.

 

Thanks HARSH you solve my problem in a very easy way. Lot of thnax, Sir I have an other broblem how it posible to connect Oracle database is installed a PC which is server and an other pC whiclh install only Oracle Form . How I connect to That PC with Server where database is INstalled? Thanx Take care

 10 pts.