This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Oracle8 Personal Edition and jdbc URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle8 Personal Edition and jdbc URL" Watch "Oracle8 Personal Edition and jdbc URL" New topic

Oracle8 Personal Edition and jdbc URL

Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I've installed Oracle 8 Personal edition in my NT box and created an instance called MDM. Now I am trying to write a simple JDBC code to connect to the database. I don't know the port number that I supposed to specify in

I tried "1521" for the port and I get the exception:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
I like to know how to find the port number that Oracle service is lisening? or Is there any other way to make connection with out the port number? Thanks a million
PS: Ignore the apostrophe in front of the word Oracle
[ October 17, 2002: Message edited by: Sai Prasad ]
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
have u created any listener for ur database?
unless u havenot changed the port number of oracle it is 1521.
if u are not developing on an intranet "locathost" can be used as the host name.
also to check wheter you have installed ur oracle correctly try to log onto SQLPLUS using user name/password and databse
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Hello Prabhat,
Thanks for the reply. I can logon to the database from the command line using the command:
"sqlplus sprasad/sprasad". I get connected to the MDM instance because that is the only instance running in my machine.
I am not able to specify any instance name like
"sqlplus sprasad/sprasad@MDM"
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I solved it. I was supposed to create a TNS listener using the Net8Configuration assistant for the port 1521. Now everything works great! Thanks.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Oracle8 Personal Edition and jdbc URL
It's not a secret anymore!