Hi,
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbcracle:thin192.1.1.168:1521rcl";
con = DriverManager.getConnection(url, "system","manager");
}
catch (SQLException ex)
{
System.out.println("\nFatal error: cannot connect to database!\n" + ex);
System.exit(1);
}
catch (java.lang.ClassNotFoundException ex)
{
System.out.println("\nFatal error: class not found!");
System.exit(1);
}
192.1.1.168 is Oracle DB Server address.
I configured my service name in tnsnames.ora is "abcora.transitlink.com.sg" and I never configure SID for my Oracle8i 8.1.7 DB.
I got the following error message:
Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Pls help, Thanks !
larva
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbcracle:thin192.1.1.168:1521rcl";
con = DriverManager.getConnection(url, "system","manager");
}
catch (SQLException ex)
{
System.out.println("\nFatal error: cannot connect to database!\n" + ex);
System.exit(1);
}
catch (java.lang.ClassNotFoundException ex)
{
System.out.println("\nFatal error: class not found!");
System.exit(1);
}
192.1.1.168 is Oracle DB Server address.
I configured my service name in tnsnames.ora is "abcora.transitlink.com.sg" and I never configure SID for my Oracle8i 8.1.7 DB.
I got the following error message:
Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Pls help, Thanks !
larva