| Author |
JDBC connectivity with Oracle DB on MacBook.
|
ven jovovich
Greenhorn
Joined: Sep 06, 2012
Posts: 20
|
|
Hi all,
I have installed Oracle 10g DB on my Macbook exactly as described in: http://www.pythian.com/news/1937/quick-install-guide-for-oracle-10g-release-2-on-mac-os-x-leopard-intel/
In short (according to the above link) I have installed Oracle 10g on my local machine after logging in with username "oracle". Period.
Now, this is what I am doing:
After restarting my machine, I log in with 'XXX' username I open a terminal window and start the oracle database instance by logging in as "oracle".
Then I type the below code which compiles without any error:
Upon trying to run this code, I am facing the following error:
Do I need to install Oracle client for the username 'XXX' and modify the TNSNAMES.ORA file?
Please tell me where I am going wrong.
Regards,
Ven,
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 2538
|
|
|
Yes, you'll need a SID or a service name in the connection string. Check out the Oracle JDBC FAQ.
|
 |
ven jovovich
Greenhorn
Joined: Sep 06, 2012
Posts: 20
|
|
Hi,
I modified my code as follows:
now the error at runtime is:
and this is the output of tnsping:
Please help.
Regards,
Ven.
|
 |
Vinod Tiwari
Ranch Hand
Joined: Feb 06, 2008
Posts: 458
|
|
|
Please refer this for details.
|
Vinod Tiwari | Twitter
|
 |
 |
|
|
subject: JDBC connectivity with Oracle DB on MacBook.
|
|
|