You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rao Manekar <ma...@dcor.state.ga.us> on 2002/07/10 18:23:10 UTC

TNS:protocol adapter error ; ORA-12560 ; sqlState=66000

Hi:

I am using: 
Windows 2000
IIS 5.0
Tomcat 4.04
JDK 1.4
Oracle 9i
Orcale OCI JDBC driver
( I am using NMP in place of TCP for connecting db server)
using JSP/java beans

I am getting following error when I tried to connect to database.

ORA-12560: TNS:protocol adapter error 
sqlState=66000

I could able to connect to the database through Oracle SQL SqlPlus with the same userid, password and tnsname that I am using in my Java class file.

I also created a simple Java application and run it through command prompt, it connects to the database with out any problem using following code:

Connection conn = DriverManager.getConnection
                        ("jdbc:oracle:oci:@" + TNSNAME, user, password);

(used example mentioned at end of the webpage:
http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/getsta.htm
)


I tried all the options mentioned below:
(obtained from 
http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/basic.htm#1000881
)

/*******************************************/
Connection conn = DriverManager.getConnection 
                  ("jdbc:oracle:oci:scott/tiger@");

Connection conn = DriverManager.getConnection 
                  ("jdbc:oracle:oci:@", "scott", "tiger");

Connection conn = DriverManager.getConnection
                  (jdbc:oracle:oci:@MyHostString","scott","tiger");
used tnsname for MyHostString

Connection conn = DriverManager.getConnection
   ("jdbc:oracle:oci:@(description=(address=(host= myhost)
   (protocol=tcp)(port=1521))(connect_data=(INSTANCE_NAME=orcl)))",
   "scott", "tiger");

(modified the above one for named pipes as:
(description=(address=(protocol=NMP)(server=<servername>)(pipe=ORAPIPE))(connect_data=(SID=<sid>)))
)
/*******************************************/

In all instances I am getting the same error message.

Can any one help me connecting to the database?  

Thanks in advance.


Rao Manekar


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>