• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JDBC connectivity with Oracle DB on MacBook.

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Sheriff
Posts: 3064
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you'll need a SID or a service name in the connection string. Check out the Oracle JDBC FAQ.
 
ven jovovich
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I modified my code as follows:


now the error at runtime is:


and this is the output of tnsping:


Please help.
Regards,
Ven.
 
Ranch Hand
Posts: 466
1
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please refer this for details.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic