11 Replies Latest reply: Oct 25, 2009 3:38 PM by vejpuste RSS

    Oracle Instant client 10.2 configuration

    718096
      Hi
      I have oracle instant client 10.2 and i have oracle installed on redhat linux machine, i want to connect to that oracle from windows 2003 machine. i have oracle instant client 10.2 package, which has following files.

      1. classes12.jar
      2. glogin.sql
      3. oci.dll
      4. ocijdbc10.dll
      5. ociw32.dll
      6. ojdbc14.jar
      7. orannzsbb10.dll
      8. oraocci10.dll
      9. oraociei10.dll
      10. Orasqlplusic10.dll
      11. sqlplus.exe
      12. sqlnet.log

      when i say
      sqlplus sys/password@//10.97.119.176:1523/DB001007 (where database name is DB001007, sys is username , password is password and 10.97.119.176 is machine in this machine oracle has
      been installed)

      It is giving following error:

      Enter user-name: sys
      Enter password:
      ERROR:
      ORA-12560: TNS:protocol adapter error

      I checked the oracle service and listener, both are running. Any one please let me know how to connect to that oracle?

      any idea would be appreciated.

      Thanks and Regards,
      Santhosh Kumar.

      Edited by: user5532299 on Aug 19, 2009 6:13 AM
        • 1. Re: Oracle Instant client 10.2 configuration
          Toni Lazarin
          You will also need to have correctly configured [tnsnames.ora|http://download.oracle.com/docs/cd/B19306_01/network.102/b14213/tnsnames.htm#NETRF007] file.
          • 2. Re: Oracle Instant client 10.2 configuration
            718096
            Hi Toni Lazarin,

            I have tnsnames.tra file at /opt/software/oracle/database/10.2.0/db_1/network/admin/tnsnames.ora. so should i copy this file to my client location i.e. C:\instantclient_10_2


            Thanks and Regards,
            Santhosh Kumar.
            • 3. Re: Oracle Instant client 10.2 configuration
              LaurenzAlbe
              Please ignore the advice concerning tnsnames.ora, it is misleading.
              You don't need any tnsnames.ora.

              Do you have an sqlnet.ora? If not, that is fine.

              First, make sure that you can reach the listener. From a DOS-Box, try

              telnet 10.97.119.176 1523

              If you get an error, the values are bad or the network connection is broken.
              If you get no answer and it just hangs, everything is fine.

              Second, make sure that DB001007 is the service name of the database.
              Not the SID.
              You can display the service name with the following SQL*Plus command on the server:

              SHOW PARAMETER service_names

              Third, either use a user different from SYS or add AS SYSDBA at the end of the line.

              Tell us what happens!

              Yours,
              Laurenz Albe
              • 4. Re: Oracle Instant client 10.2 configuration
                718096
                I did telnet 10.97.119.176 1523 and it just hangs. so it is fine. i used service name of the database instead of SID. even though i got same error.
                • 5. Re: Oracle Instant client 10.2 configuration
                  LaurenzAlbe
                  Well, that rules out the trivial causes :^(

                  Do you have a firewall between Client and Server?
                  If a firewall blocks connections on ports different from 1523, you could get a problem.

                  Since guessing does not seem to solve the problem, I know no way but to create an Oracle Net trace of the problem (set TRACE_LEVEL_CLIENT and TRACE_DIRECTORY_CLIENT in the client's sqlnet.ora, which must be placed in the Directory that the environment variable TNS_ADMIN points to).

                  ORA-12560 is a high-level error, and the cause will be revealed in the trace file, similar to this example:

                  -<ERROR>- error from nricall
                  -<ERROR>- nr err code: 12206
                  -<ERROR>- ns main err code: 12545
                  -<ERROR>- ns (2) err code: 12560
                  -<ERROR>- nt main err code: 515
                  -<ERROR>- nt (2) err code: 0
                  -<ERROR>- nt OS err code: 0
                  -<ERROR>- Couldn't connect, returning 12545

                  The numbers can help determine the cause of the problem.

                  Yours,
                  Laurenz Albe
                  • 6. Re: Oracle Instant client 10.2 configuration
                    718096
                    I don't have sqlnet.ora at C:\instantclient_10_2 and i am pointing TNS_ADMIN to C:\instantclient_10_2.
                    • 7. Re: Oracle Instant client 10.2 configuration
                      orafad
                      user5532299 wrote:
                      when i say
                      sqlplus sys/password@//10.97.119.176:1523/DB001007

                      It is giving following error:

                      Enter user-name: sys
                      Enter password:
                      ERROR:
                      ORA-12560: TNS:protocol adapter error
                      Is that all sqlplus says?

                      What I'm getting at is this:
                      C:\>sqlplus bl/ah@localhost/test
                      
                      SQL*Plus: Release 10.2.0.1.0 - Production on Fr Aug 21 23:52:54 2009
                      
                      Copyright (c) 1982, 2005, Oracle.  All rights reserved.
                      
                      ERROR:
                      ORA-12541: TNS:no listener
                      
                      
                      Enter user-name: sys
                      Enter password:
                      ERROR:
                      ORA-12560: TNS:protocol adapter error
                      
                      
                      Enter user-name:
                      Please retry - post a copy/paste of commands and output (of course, with any sensitive info replaced).

                      Edited by: orafad on Aug 21, 2009 11:53 PM
                      • 8. Re: Oracle Instant client 10.2 configuration
                        718096
                        I did following steps :

                        C:\instantclient_10_2>sqlplus sys/password@//10.97.119.176:1523/DB001007

                        SQL*Plus: Release 10.2.0.3.0 - Production on Mon Aug 24 17:24:09 2009

                        Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

                        ERROR:
                        ORA-12514: TNS:listener does not currently know of service requested in connect
                        descriptor


                        Enter user-name: sys
                        Enter password:
                        ERROR:
                        ORA-12560: TNS:protocol adapter error


                        Thanks and Regards,
                        Santhosh Kumar.
                        • 9. Re: Oracle Instant client 10.2 configuration
                          orafad
                          user5532299 wrote:
                          C:\instantclient_10_2>sqlplus sys/password@//10.97.119.176:1523/DB001007
                          ERROR:
                          ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
                          So this is the "real" symptom. It indicates that db001007 is a unknown service name.

                          Make another connect attempt as above and check:
                          what's the corresponding entry in the tail of listener.log (on the server side) and what does lsnrctl stat say (again, on the server side)?
                          • 10. Re: Oracle Instant client 10.2 configuration
                            728479
                            Were u able to solve this problem. If so could u let me know. I have the same scenario downloaded the instant client and trying to connect to oracle from PHP file getting the error

                            [function.oci-connect]: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\orcTest.php on line 3

                            Thanks
                            • 11. Re: Oracle Instant client 10.2 configuration
                              vejpuste
                              Hello,
                              Are you sure with port 1523?
                              Default port of Oracle is 1521.
                              Try use correct tnsnames.ora and new user (no SYS).
                              Or try :
                              sqlplus -l user/pass@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=IP)(PORT=1521))(CONNECT_DATA =(SID=DBSID)))'
                              I try this on Linux and working OK.
                              Regards
                              Libor