dcsimg
Connecting to a Oracle 8 DB with JDBC?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Martin_Croteau
Posted On:   Monday, July 16, 2001 06:47 PM

Hi! I'm a computer programming university student and I've been having problems using JDBC. While I was doing a database course, the teacher gave us this line to use to do an assignment: String Url = "jdbc:oracle:thin@arabica.cafe.uqam.ca:1521:08db". That Url worked perfectly to access the university servers (arabica.cafe.uqam.ca) and access the database wich was on them. Now, I'm currently doing another assignment in a completly different course and I have to create a new DB. Because it's the summer, I haven't been able to get hold of the teacher wich gave me the Url in the first place. Also because It's summer, I can't put my DB on the university servers so I have to put it on my home comput   More>>

Hi!


I'm a computer programming university student and I've been having problems using JDBC.


While I was doing a database course, the teacher gave us this line to use to do an assignment: String Url = "jdbc:oracle:thin@arabica.cafe.uqam.ca:1521:08db".


That Url worked perfectly to access the university servers (arabica.cafe.uqam.ca) and access the database wich was on them. Now, I'm currently doing another assignment in a completly different course and I have to create a new DB. Because it's the summer, I haven't been able to get hold of the teacher wich gave me the Url in the first place. Also because It's summer, I can't put my DB on the university servers so I have to put it on my home computer.


If you could help me, I would appreciate it. Here's what I want to do: I installed Oracle 8 on my home computer and I would like to use a modified version of the previous line to access the database I created. Arabica.cafe.uqam.ca are the server from school, how can I change the line above so my Java program accesses the database on my computer instead of trying to access my university's servers?


I tried just changing the numbers at the end of the URL, I checked in my networking manuals to see if I would not find an IP address that could work and changing arabica... by my computer's IP address. I tried a couple of things and nothing worked. The teacher just gave us the line and didn't really explain all the numbers in it or how to change it correctly.


Your help would be greatly appreciated!


Martin Croteau

   <<Less

Re: Connecting to a Oracle 8 DB with JDBC?

Posted By:   Mika_Vehkala  
Posted On:   Wednesday, July 18, 2001 12:03 AM

Eh, you really should know which port and "instance" name your oracle installation is using. Have you tried:

"jdbc:oracle:thin@127.0.0.1:1521:ORCL"

jdbc:oracle:thin <- defines the driver
after @ character comes the ip (127.0.0.1 is the local address) then comes the port number (1521 is quite standard oracle port). Finally comes the "instance?" name of your oracle server (Usually ORCL), can be anything.

About | Sitemap | Contact