This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have made a small program that will connect to the oracle db. I also added catch blocks to find out when something goes wrong. This is the code block: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); String url = "jdbc racle:thin:10.0.0.2:1433"; String username = "user"; String password = "password"; DriverManager.getConnection(url,username,password); This is the error: SQLException SQLState: null Message: Io exception: The Network Adapter could not establish the connection Vendor:17002 when i try the same code with the sqlserver (of course i changed the first line to Class.forName(com.ms.jdbc.sql....), the url, username and password), it works just fine. Can anyone tell me what is wrong with the code above? What can i do to remove the error?
Nigel Browne
Ranch Hand
Joined: May 15, 2001
Posts: 673
posted
0
String url = "jdbc: oracle:thin@10.0.0.2:1433:<SID>; I hope this helps Nigel [ February 14, 2002: Message edited by: Nigel Browne ] [ February 14, 2002: Message edited by: Nigel Browne ]
jacq carballo
Ranch Hand
Joined: Feb 10, 2002
Posts: 42
posted
0
I made the code changes but this next problem came out: SQLException: SQLState: null Message: Invalid Oracle URL Vendor: 17067 I am sure that the IP address and the port number i used are correct because i telnet to them all the time (and i rechecked them to make sure i did not do any typo error). Thanks in advance.
martin samm
Ranch Hand
Joined: Nov 09, 2000
Posts: 31
posted
0
the connection string is missing a colon. It should be : jdbc racle:thin:@<machineip/name>:<port>:<sid>
martin samm<BR>m_sam@rroom.net
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.