3 Replies Latest reply: Jul 20, 2011 2:13 AM by LaurenzAlbe RSS

    How to trace oracle instant client ,application works after restart

    601898
      hi ,

      Have few questions:-
      is it possible to trace instant client oracle 10.2.0.3

      To give a background of the issue
      Application is able to download data without any issues for some days.
      But at times encounter error and are not able to download data.
      after restart of the application ,it is able to connect.

      The oracle client is on a centralized filesystem which is shared by all.

      The application connects using instant client.

      connection.url=//nacho_india:1527/NACHOS.WORLD
      db.login=nacho

      host=ny2kapp

      It is found that sometimes it is resolving to ip 127.0.0.1 and some other ip which is present in /etc/hosts from the application machine.
      is there any way to trace the path.

      The client side sqlnet log is below:-




      Fatal NI connect error 12541, connecting to:
      (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=NACHOS.WORLD)(CID=(PROGRAM=appnacho)(HOST=ny2kapp)(USER=nach123)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1527)))

      VERSION INFORMATION:
      TNS for Linux: Version 10.2.0.3.0 - Production
      TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.3.0 - Production
      Time: 03-JUN-2011 06:49:46
      Tracing not turned on.
      Tns error struct:
      ns main err code: 12541
      TNS-12541: Message 12541 not found; No message file for product=network, facility=TNS
      ns secondary err code: 12560
      nt main err code: 511
      TNS-00511: Message 511 not found; No message file for product=network, facility=TNS
      nt secondary err code: 111
      Vinherkar, Aashish C [4:51 PM]:
      from this log it shows that the IP does not match the database server ip



      •     client side sqlnet.log :-

      Fatal NI connect error 12541, connecting to:
      (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=NACHOS.WORLD)(CID=(PROGRAM=appnacho)(HOST=ny2kapp)(USER=nach123)))(ADDRESS=(PROTOCOL=TCP)(HOST=170.240.212.30)(PORT=1527)))

      VERSION INFORMATION:
      TNS for Linux: Version 10.2.0.3.0 - Production
      TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.3.0 - Production
      Time: 02-JUN-2011 06:48:48
      Tracing not turned on.
      Tns error struct:
      ns main err code: 12541
      TNS-12541: Message 12541 not found; No message file for product=network, facility=TNS
      ns secondary err code: 12560
      nt main err code: 511
      TNS-00511: Message 511 not found; No message file for product=network, facility=TNS
      nt secondary err code: 111




      Thanks and regards,
      Aarya
        • 1. Re: How to trace oracle instant client ,application works after restart
          LaurenzAlbe
          You can trace Oracle client, which will give you detailed information of what Oracle does.
          It won't be able to tell you why somebody calls Oracle this way or that.

          To enable tracing, set the environment variable TNS_ADMIN and point it to your Instant Client directory (if TNS_ADMIN is not already set).
          In that directory, create a file "sqlnet.ora" and add the following lines:

          DIAG_ADR_ENABLED = OFF
          TRACE_LEVEL_CLIENT = SUPPORT
          TRACE_DIRECTORY_CLIENT = <some directory>

          Where <some directory> must be writable by the application that calls Oracle.

          Yours,
          Laurenz Albe
          • 2. Re: How to trace oracle instant client ,application works after restart
            aashishcv
            hi,
            have few question on setting variable.

            since there are many application which use the shared instant client,is it possible to generate trace for specific application only.
            Will it generate trace for all application connecting through it.


            DIAG_ADR_ENABLED = OFF
            TRACE_LEVEL_CLIENT = SUPPORT
            TRACE_DIRECTORY_CLIENT = <some directory>

            Where <some directory> must be writable by the application that calls Oracle.

            Thanks and regards,
            Aarya
            • 3. Re: How to trace oracle instant client ,application works after restart
              LaurenzAlbe
              Yes, that would trace all processes that use this client installation.

              What you can do is to add the lines to ".sqlnet.ora" in the home directory of a user, then only the processes running with that user ID will be traced.

              By the way, I realized that I made a mistake: for Client 10.2 omit the "DIAG_ADR_ENABLED" line, that's for Oracle 11.

              Yours,
              Laurenz Albe