1 2 3 Previous Next 44 Replies Latest reply on Sep 17, 2008 3:16 AM by Maran Viswarayar

    ORA-TNS:12541

    639811
      Hi all,
      i m having some problem in connecting to the database.(i.e)i have created the database on oracle 9.2.0.5.0
      operating system is windows2000 server.

      i m usually configure the exp backup on one linux server from that linux box itself i can connect to all databases. thru that way only i used to take backup .
      But now when i m trying to connect to that particular database on windows
      it says
      ORA-TNS:12541 No listener
      i dont know where the problem is.
      in the meantime i can able to ping and connect to the rest of the databases.
      pls suggest me ..
      1.)lsnrctl status is up
      2.)i have made the enrty in tnsnames.ora file also.
      Eventhough i did al these things i cant ping to that database.
      when i try normal ping using that database IP. it happens but tnsping<dbname>
      it throws error 12541..
      pls give some tips..

      Regards,
      M.Murali...
        • 1. Re: ORA-TNS:12541
          Maran Viswarayar
          Is it pointing to righ port

          Check the port number in the tnsnames.ora

          Compare the TNSNAMES.ora with listener.ora

          Mostly will be a port mismatch

          Is the instance registered against the listener
          • 2. Re: ORA-TNS:12541
            Anand...
            Stop and again restart the listener on windows.Try once...

            Regards,
            Anand
            • 3. Re: ORA-TNS:12541
              Paul M.
              lsnrctl status is up
              How did you check that out ? That is, is the listener running, or the database is registered with it as well ?

              Also post your tnsnames.ora from Linux machine, and, from the database server, the result of

              C:\>lsnrctl serv
              • 4. Re: ORA-TNS:12541
                639811
                Hi i have checked the both servers port numbers also.
                same 1521 no change.

                here i have pasted the sqlnet.ora file of WINDOWS

                # This file is actually generated by netca. But if customers choose to
                # install "Software Only", this file wont exist and without the native
                # authentication, they will not be able to connect to the database on NT.

                SQLNET.AUTHENTICATION_SERVICES = (NTS)

                this is the sqlnet.ora file for LINUX:


                # SQLNET.ORA Network Configuration File: /data1/oracle/network/admin/sqlnet.ora
                # Generated by Oracle configuration tools.

                NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

                Tell me one thing is the both files are right ?

                Regards
                M.Murali..
                • 5. Re: ORA-TNS:12541
                  user00726
                  try to add this parameter to sqlnet.ora to yoor client and server ant then try to find out is there any Transport error inyour trace files

                  client
                  NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
                  TRACE_LEVEL_CLIENT=16
                  LOG_DIRECTORY_CLIENT=cleint_Log
                  LOG_FILE_CLIENT=sqlnet_log
                  SQLNET.EXPIRE_TIME=0
                  trace_level_client = ADMIN
                  TRACE_DIRECTORY_CLIENT=client_trace
                  TRACE_FILE_CLIENT=sqlnet_trc
                  At Server side
                  NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
                  TRACE_LEVEL_CLIENT=16
                  LOG_DIRECTORY_CLIENT=server_Log
                  LOG_FILE_CLIENT=sqlnet_log
                  SQLNET.EXPIRE_TIME=0
                  trace_level_client = ADMIN
                  TRACE_DIRECTORY_CLIENT=server_trace
                  TRACE_FILE_CLIENT=sqlnet_trc
                  • 6. Re: ORA-TNS:12541
                    639811
                    Hi pasted those lines in the two corresponding files (CLIENT as well as SERVER)
                    still the same problem persists???
                    Any suggestions

                    Regards
                    M.Murali..
                    • 7. Re: ORA-TNS:12541
                      EdStevens
                      Balamurali wrote:
                      Hi pasted those lines in the two corresponding files (CLIENT as well as SERVER)
                      still the same problem persists???
                      Any suggestions

                      Regards
                      M.Murali..
                      If you look at what you were asked to add to the sqlnet.ora files, you will see that it was dealing with creating log and trace files -- nothing to do with changing behavior. Therefore, one would expect the problem to persist, but now you should have more diagnostics available to you.

                      Also, you were asked to post the results of 'lsnrctl status' on the db server machine and the contents of tnsnames.ora from your client machine. I'm betting that your tnsnames entry is specifying a service name that is not supported by the listener.
                      • 8. Re: ORA-TNS:12541
                        639811
                        Hi steven,
                        pls find the attached tnsnames.ora for client machine(LINUX)
                        *******************************************
                        STAGEDB =
                        (DESCRIPTION =
                        (ADDRESS = (PROTOCOL = TCP)(HOST =10.1.2.2)(PORT = 1521))
                        (CONNECT_DATA =
                        (SERVER = DEDICATED)
                        (SERVICE_NAME = STAGEDB)
                        )
                        )


                        SERVER (WINDOWS)
                        lsnrctl status

                        LSNRCTL for 32-bit Windows: Version 9.2.0.5.0 - Production on 12-SEP-2008 11:19:21

                        Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

                        Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.2.2)(PORT=1521)))
                        STATUS of the LISTENER
                        ------------------------
                        Alias LISTENER
                        Version TNSLSNR for 32-bit Windows: Version 9.2.0.5.0 - Productio
                        Start Date 11-SEP-2008 16:22:43
                        Uptime 0 days 18 hr. 56 min. 38 sec
                        Trace Level off
                        Security OFF
                        SNMP OFF
                        Listener Parameter File D:\oracle\ora92\network\admin\listener.ora
                        Listener Log File D:\oracle\ora92\network\log\listener.log
                        Listening Endpoints Summary...
                        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.2.2)(PORT=1521)))
                        Services Summary...
                        Service "COLDDB" has 1 instance(s).
                        Instance "COLDDB", status UNKNOWN, has 1 handler(s) for this service...
                        Service "LOCALDB" has 1 instance(s).
                        Instance "LOCALDB", status UNKNOWN, has 1 handler(s) for this service...
                        Service "STAGEDB" has 1 instance(s).
                        Instance "STAGEDB", status UNKNOWN, has 1 handler(s) for this service...
                        Service "FINUAT1" has 1 instance(s).
                        Instance "FINUAT1", status UNKNOWN, has 1 handler(s) for this service...
                        Service "FINUAT3" has 1 instance(s).
                        Instance "FINUAT3", status UNKNOWN, has 1 handler(s) for this service...
                        The command completed successfully


                        pls give any suggestions..

                        Regards,
                        M.Murali..

                        Edited by: Balamurali on Sep 12, 2008 11:24 AM
                        • 9. Re: ORA-TNS:12541
                          user00726
                          Does your problem resolved if not then try to paste the trace files i.e D:\oracle\ora92\network\trace\tracegilename.trc

                          and pls go thru the trace file and check that nsprecv: transport read error

                          or try to add tcp.nodelay=yes in ur sqlnet.ora file
                          • 10. Re: ORA-TNS:12541
                            639811
                            Hi

                            on Bothe server(WINDOWS machine as well as CLIENT machine)
                            there is no trace file generated on that particular location which u specified..
                            (i.e)
                            D:\oracle\ora92\network\trace(SERVER)
                            and client(LINUX)
                            /oracle/product/92040/network/trace

                            Regards
                            M.Murali..
                            • 11. Re: ORA-TNS:12541
                              user00726
                              trace file will only be geerated when you try to reconnect ur db server
                              • 12. Re: ORA-TNS:12541
                                EdStevens
                                Ok, at this point I'd want to see the trace and log files .. and I'd want you to try to analyze them yourself - don't just paste a huge trace file here and expect others to analyze something you haven't tried to analyze yourself.

                                Here's the course of action:

                                First, in your sqlnet.ora files on both the client and server, change the entries LOG_DIRECTORY_* and TRACE_DIRECTORY_* to explicity specify ORACLE_HOME/network/trace or ORACLE_HOME/network/log. Note that you need to expand ORACLE_HOME to actually specify the ORACLE_HOME directory.

                                Example:

                                LOG_DIRECTORY_CLIENT=C:\oracle\product\10.2.0\client_1\NETWORK\log
                                LOG_FILE_CLIENT=sqlnet_client.log

                                TRACE_DIRECTORY_CLIENT=C:\oracle\product\10.2.0\client_1\NETWORK\trace
                                TRACE_FILE_CLIENT=sqlnet_client.trc

                                TRACE_LEVEL_CLIENT=16


                                and similar entries for TRACE__SERVER


                                Next, after making that change, reproduce the error. At this point you should have some log and trace files in the specified directories.
                                • 13. ORA-TNS:12541
                                  639811
                                  Hi steven,
                                  Thanx for ur suggestions. yes now i can get some logs and trace files. the thing is in this file also they said that
                                  there is no listener. i dont know?
                                  i checked the telnet from the client machine to source ip(windows database server) thru port 1521
                                  i think there is no problem in connecting port (1521)
                                  but still i m getting the same error.
                                  see the last few lines of client machine log file of sqlnet.ora(not full file)
                                  *********************************************
                                  Tracing to file: /oracle/product/92040/network/trace/sqlnet_client_32407.trc
                                  Tns error struct:
                                  nr err code: 0
                                  ns main err code: 12541
                                  TNS-12541: TNS:no listener
                                  ns secondary err code: 12560
                                  nt main err code: 511
                                  TNS-00511: No listener
                                  nt secondary err code: 111
                                  nt OS err code: 0

                                  trace file for client sqlnet.ora file
                                  ****************************
                                  [12-SEP-2008 20:11:43:424] nsprecv: 1994 bytes from transport
                                  [12-SEP-2008 20:11:43:424] nsprecv: tlen=1994, plen=1994, type=6
                                  [12-SEP-2008 20:11:43:424] nsrdr: got NSPTDA packet
                                  [12-SEP-2008 20:11:43:424] nsrdr: NSPTDA flags: 0x0
                                  [12-SEP-2008 20:11:43:424] nsdo: what=1, bl=2001
                                  [12-SEP-2008 20:11:43:424] nsdo: nsctxrnk=0
                                  [12-SEP-2008 20:11:43:424] nioqrc: exit

                                  My problem is how come the listener will be problem since the listener is up and running in two servers (client also.)

                                  what else required.
                                  Now i can able to tnsping to that databases also. It also working fine ..
                                  But when i m trying to connect only it takes a lot of time and atlast the same no listener..

                                  if u have any suggestions reg.this pls let me know. coz i dont like to take backup from windows server and then compress and ftp to linux.
                                  thats y i tried to take a backup from linux(client machine itself)

                                  Regards
                                  M.Murali...

                                  Edited by: Balamurali on Sep 12, 2008 8:26 PM
                                  • 14. Re: ORA-TNS:12541
                                    EdStevens
                                    Balamurali wrote:
                                    Hi steven,
                                    Thanx for ur suggestions. yes now i can get some logs and trace files. the thing is in this file also they said that
                                    there is no listener. i dont know?
                                    i checked the telnet from the client machine to source ip(windows database server) thru port 1521
                                    i think there is no problem in connecting port (1521)
                                    but still i m getting the same error.
                                    see the last few lines of client machine log file of sqlnet.ora(not full file)
                                    *********************************************
                                    Tracing to file: /oracle/product/92040/network/trace/sqlnet_client_32407.trc
                                    Tns error struct:
                                    nr err code: 0
                                    ns main err code: 12541
                                    TNS-12541: TNS:no listener
                                    ns secondary err code: 12560
                                    nt main err code: 511
                                    TNS-00511: No listener
                                    nt secondary err code: 111
                                    nt OS err code: 0

                                    trace file for client sqlnet.ora file
                                    ****************************
                                    [12-SEP-2008 20:11:43:424] nsprecv: 1994 bytes from transport
                                    [12-SEP-2008 20:11:43:424] nsprecv: tlen=1994, plen=1994, type=6
                                    [12-SEP-2008 20:11:43:424] nsrdr: got NSPTDA packet
                                    [12-SEP-2008 20:11:43:424] nsrdr: NSPTDA flags: 0x0
                                    [12-SEP-2008 20:11:43:424] nsdo: what=1, bl=2001
                                    [12-SEP-2008 20:11:43:424] nsdo: nsctxrnk=0
                                    [12-SEP-2008 20:11:43:424] nioqrc: exit

                                    My problem is how come the listener will be problem since the listener is up and running in two servers (client also.)
                                    Huh? What do you mean the listener is running on two servers (client also)? The listener is a server-side process. It runs on the machine where the database is running. Except in highly exceptional cases, only one listener should be running on the machine where the database is running.

                                    I'm not clear on which trace/log file is what. I know I asked you to not paste an entire trace file, but now you've cut it down too much... I'm not seeing the important parts. Please show me again your complete sqlnet.ora file from both the the client and server machines ... and clearly identify which is which. Don't delete any of your trace or log files yet.
                                    if u have any suggestions reg.this pls let me know. coz i dont like to take backup from windows server and then compress and ftp to linux.
                                    thats y i tried to take a backup from linux(client machine itself)
                                    Well, export is not a backup, but that is not germane to the problem at hand. For now let's stick with sqlplus and tnsping for our testing.
                                    >
                                    Regards
                                    M.Murali...

                                    Edited by: Balamurali on Sep 12, 2008 8:26 PM
                                    1 2 3 Previous Next