8 Replies Latest reply: Mar 10, 2011 8:43 AM by 838944 RSS

    Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3

    838944
      I am novice to databases.

      I am trying to connect Oracle 6i to my Database 10g 10.2.0.3 Express Edition.

      Error Code: ORA-12154: TNS could not resolve service name.

      I go to Start>>Oracle 6i>>Form Builder. Click on File>>Connect>>Enter Username and password. I enter database name as orcl. The I get the error message.

      I am using Windows Vista 32 bit. Oracle 10g 10.2.0.3.

      What may I do so that I am able to connect and bulid the form.

      Thanking you.
        • 1. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
          Paul M.
          Error Code: ORA-12154: TNS could not resolve service name.
          $ oerr ora 12154
          12154, 00000, "TNS:could not resolve the connect identifier specified"
          // *Cause:  A connection to a database or other service was requested using
          // a connect identifier, and the connect identifier specified could not
          // be resolved into a connect descriptor using one of the naming methods
          // configured. For example, if the type of connect identifier used was a
          // net service name then the net service name could not be found in a
          // naming method repository, or the repository could not be
          // located or reached.
          // *Action:
          //   - If you are using local naming (TNSNAMES.ORA file):
          //      - Make sure that "TNSNAMES" is listed as one of the values of the
          //        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
          //        (SQLNET.ORA)
          //      - Verify that a TNSNAMES.ORA file exists and is in the proper
          //        directory and is accessible.
          //      - Check that the net service name used as the connect identifier
          //        exists in the TNSNAMES.ORA file.
          //      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
          //        file.  Look for unmatched parentheses or stray characters. Errors
          //        in a TNSNAMES.ORA file may make it unusable.
          //   - If you are using directory naming:
          //      - Verify that "LDAP" is listed as one of the values of the
          //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
          //        (SQLNET.ORA).
          //      - Verify that the LDAP directory server is up and that it is
          //        accessible.
          //      - Verify that the net service name or database name used as the
          //        connect identifier is configured in the directory.
          //      - Verify that the default context being used is correct by
          //        specifying a fully qualified net service name or a full LDAP DN
          //        as the connect identifier
          //   - If you are using easy connect naming:
          //      - Verify that "EZCONNECT" is listed as one of the values of the
          //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
          //        (SQLNET.ORA).
          //      - Make sure the host, port and service name specified
          //        are correct.
          //      - Try enclosing the connect identifier in quote marks.
          //
          //   See the Oracle Net Services Administrators Guide or the Oracle
          //   operating system specific guide for more information on naming.
          $
          Check out TNSNAMES.ORA file within Forms ORACLE_HOME.
          • 2. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
            Lubiez Jean-Valentin
            Hello,

            ... Database 10g 10.2.0.3 Express Edition.
            ... enter database name as orcl.
            There's something to clarify, if you use Express Edition generally the Database name is XE and not ORCL ... except if you renamed it.


            Hope this help.
            Best regards,
            Jean-Valentin
            • 3. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
              zaferaktan
              Hi there,

              unless there is a TNS_ADMIN environment defined on your local system, Forms 6i uses the one residing under the network/admin/ subdirectory of the Forms 6i installation directory. So, you need to ensure that you are using the correct tnsnames.ora file. In that tnsnames.ora file, you need an entry for the XE similar to this:


              XE =
              (DESCRIPTION =
              (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.130)(PORT = 1521))
              (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME = XE)
              )
              )


              you can use the IP address of the machine that is hosting the XE db server or use the name of the server (using IP makes life easier for you).
              • 4. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
                838944
                Thank you.

                I checked my database name. Its named orcl
                • 5. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
                  19426
                  You are sure you're talking about Express Edition? 10.2.0.3 looks like a 'normal' database version.

                  http://www.oracle.com/technetwork/database/10203vista-087538.html

                  But anyway the problem remains the same, make sure your 6i installation has access to a valid tnsnames.ora . By default it does NOT use tnsnames.ora from from the database ORACLE_HOME.

                  Werner
                  • 6. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
                    zaferaktan
                    you are NOT using XE, but that does not matter.

                    Once the TNS_ADMIN and TWO_TASK are properly defined, then you should have no problem. We have been using Forms/Reports 6i based client/server application on Linux to connect to 817 to 11gR2 - it is the same OFA principle. Once Forms is installed it's own Home, and the above mentioned environment variables are set, you should be able to connect to your target database from your form login screen or developer window. On our system (Linux), I have a Forms 6i specific profile file, that I am sourcing prior to start the forms 6i developer. It might be helpful - so here it is.

                    ================== contents =======================

                    # Forms/Reports Developer 6i DDS related environment settings.
                    # Source this file to bring up the designer modules
                    # This settings are for connections to our 10g database server

                    echo "***Do not forget to set the DISPLAY environment variable.***"
                    unsetenv PATH
                    unsetenv LANG

                    set path=(. \
                    $JTLSHOME \
                    $JTLSHOME/script \
                    $JEXECUTE \
                    $JTLSHOME/bin_support/$JPLATFORM \
                    $MOTIFHOME/bin \
                    /bin \
                    /usr/bin \
                    /usr/sbin \
                    /bin_linux/linux.i386/bin \
                    /usr/local/bin )

                    setenv ORACLE_TERM xterm
                    setenv ORACLE_BASE /home/oracle
                    setenv ORACLE_HOME /home/oracle/Forms6i
                    setenv ORACLE_SID JTLS5
                    setenv TNS_ADMIN /home/oracle
                    setenv TWO_TASK JTLS5
                    setenv ORACLE_AUTOREG $ORACLE_HOME/guicommon6/tk60/admin

                    setenv TK_PRINT_STATUS echo
                    setenv TK2_PRINT_STATUS echo
                    setenv TK6_PRINT_STATUS echo
                    setenv TK60_PRINTER dummylp
                    setenv TK6_PRINTER dummylp
                    setenv ORACLE_PRINTER dummylp
                    setenv PRINTER dummylp

                    # Update both LD_LIBRARY_PATH and PATH for 6i
                    setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:/usr/X11R6/lib:/usr/lib
                    setenv PATH $ORACLE_HOME/bin:${PATH}
                    # Without the following line, we were getting FRM 91111 error.
                    setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data
                    # Lets set the forms, reports, graphics related environment variables now
                    setenv FORMS60_PATH $JSOURCE/dds/6i/forms
                    setenv FORMS60_TERMINAL $ORACLE_HOME/forms60/admin/terminal/US
                    setenv TK60_ICON $JSOURCE/dds/6i/icons
                    setenv UI_ICON $JSOURCE/dds/6i/icons

                    setenv REPORTS60_PATH $JSOURCE/dds/6i/reports
                    setenv TK60_TERMINAL $ORACLE_HOME/reports60/admin/terminal/US
                    setenv REPORTS60_JNI_LIB $ORACLE_HOME/network/jre11/lib/linux/native_threads
                    setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH/:$REPORTS60_JNI_LIB

                    setenv GRAPHICS60_PATH $JSOURCE/dds/6i/graphics
                    setenv ORACLE_PATH $JEXECUTE/dds/6i

                    setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH/:$MOTIFHOME/lib:$JTLSHOME/lib/$JPLATFORM/lib

                    ====================== end =========================


                    Edited by: zaferaktan on Mar 10, 2011 4:57 PM
                    • 7. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
                      838944
                      I am so sorry. I was not connected to Internet and could not access the forums for couple of days.

                      I am going to rate the answerers.

                      Thank you! and sorry again.
                      • 8. Re: Please assist me! Unable to connect Oracle 6i to Database 10 g 10.2.0.3
                        838944
                        I made the requisite changes in the TNSNAMES.ORA file. I will check out your solution.

                        Thank you.