• 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:

Role of XE

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Please advice what is the role of XE from the following line of code.

I found the following entry in tnsnames.ora file

I am able to execute the program. My question is, Are these related ?

Also, I changed the above 2 entries as given below



I am getting following error
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:xe24


Please advice

Thanks,
Seshu
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, the first example uses "XE" in 3 places. The second one uses "XE19" in two places, "XE24" in one place, and then causes an error message. It seems kind of obvious what should be tried to fix the error, no?
 
Seshaiah Chimata
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even if I mess up with tnsnames.ora file and use this snipped in my code, It works fine

I want to know the relationship between my program and tnsnames.ora file.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Seshaiah Chimata wrote:I want to know the relationship between my program and tnsnames.ora file.


There isn't any. The connect string you're using does not use TNSNAMES.

Our Oracle FAQ contains a link to a page explaining connection strings. A connection string that would utilize TNSNAMES looks different from what you have.
 
Seshaiah Chimata
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Martin, I am clear with connection string usage but not sure how to use/leverage tnsnames.ora file. Can you please provide an example how connection string can utilize tnsnames.ora file
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's been a while, but I believe tnsnames.ora is only used when you are using the "thick" oracle client.

WP
 
Martin Vashko
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm probably at risk of sounding repetitive, but our Oracle FAQ contains a link to a page explaining connection strings, in as much detail as necessary.

The description includes how to form a connection string which uses tnsnames.ora and also mentions that since version 10.2.0.1.0 even the thin driver does support using tnsnames.ora.

It is exactly two clicks away from here. Please ShowSomeEffort.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic