dipsmyname
09-03-02, 09:56
| Hi, When I try to connect Oracle (residing on a NT box) using sqlplus (sqlplus datarx_dev/datarx_dev@datarx) from the client installed on a Linux server I get connected to the Oracle instance. Now I tried to connect to Oracle using the following code in Java (JDK 1.3.1): import java.sql.*; public class OciConnTest { public static void main(String[] arg) { Connection conn = null; try{ Class.forName("oracle.jdbc.driver.OracleDriver"); conn = DriverManager.getConnection("jdbc:oracle:oci8:@datarx", "datarx_dev", "datarx_dev"); //conn = DriverManager.getConnection("jdbc:oracle:oci8:@tcgprod", "system", "manager"); System.out.println("Connected"); }catch(Exception e){ System.out.println(e); }finally{ try{ conn.close(); }catch(Exception ex){ } } } } I get the following error: java.sql.SQLException: ORA-12545: Connect failed because target host or object does not exist Any help is appreciated. |