Error while open connection with :
Error while performing database login with oracle(Thin Driver) driver:
IO exception :Connection refused(Description =(Tmp=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=( ERROR=(CODE=12505)(EMFI=4)) ) )
Printable View
Error while open connection with :
Error while performing database login with oracle(Thin Driver) driver:
IO exception :Connection refused(Description =(Tmp=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=( ERROR=(CODE=12505)(EMFI=4)) ) )
documentation for ora-12505
check if your parameters forQuote:
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
Cause: The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a SID for an instance (usually a database instance) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
Action:
- Wait a moment and try to connect a second time.
- Check which instances are currently known by the listener by executing: lsnrctl services <listener name>
- Check that the SID parameter in the connect descriptor specifies an instance known by the listener.
- Check for an event in the listener.log file.
Code:String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber
+ ":" + sid;
connection = DriverManager.getConnection(url, username, password);
are ok. perhaps it helps: the default sid for oracle is ORCL and check if one listener is running.
it is working now...thanks a lot :)