Home » Developer & Programmer » JDeveloper, Java & XML » how to get connection from dedicated server? (oracle 10g)
how to get connection from dedicated server? [message #330538] Mon, 30 June 2008 07:02 Go to next message
kang
Messages: 89
Registered: November 2007
Member
how to get connection from dedicated server?

the tnssetting looks below.

MYDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.23.10.62) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.23.10.61) (PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = MYSID)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 2)
)
)
)

in my java file
String url = "jdbc:oracle:thin:@10.23.10.62:1521:MYSID";
String user = "user";
String password = "passwd";
con = DriverManager.getConnection(url, user, password);

give the SQLException below.

java.sql.SQLException: IO Exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169870080)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Re: how to get connection from dedicated server? [message #330544 is a reply to message #330538] Mon, 30 June 2008 07:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
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.

Regards
Michel
Re: how to get connection from dedicated server? [message #330591 is a reply to message #330544] Mon, 30 June 2008 09:41 Go to previous messageGo to next message
kang
Messages: 89
Registered: November 2007
Member
I haven't checked your suggestions.
let me check at the office tomorrow ^^.

btw, this could happen depending on the oracle jdbc driver versions?
Re: how to get connection from dedicated server? [message #330608 is a reply to message #330591] Mon, 30 June 2008 10:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As far as I know not with thin driver.

Regards
Michel
Re: how to get connection from dedicated server? [message #352841 is a reply to message #330538] Thu, 09 October 2008 21:17 Go to previous message
kang
Messages: 89
Registered: November 2007
Member
Looks like Oracle RAC.

Use url string like the below.

String url = "jdbc:oracle:thin:@(description=(address_list= (address=(host=172.18.137.231) (protocol=tcp)(port=1521))(address=(host=172.18.137.230)(protocol=tcp) (port=1521)) (load_balance=yes)(failover=yes))(connect_data=(service_name= slrac.bea.com)))";

[Updated on: Thu, 09 October 2008 21:18]

Report message to a moderator

Previous Topic: How to store XML files in Oracle
Next Topic: How to get count of a repetating element in xml -tricky -need Help
Goto Forum:
  


Current Time: Thu Apr 18 12:26:29 CDT 2024