aspose file tools*
The moose likes JDBC and the fly likes Role of XE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Role of XE" Watch "Role of XE" New topic
Author

Role of XE

Seshaiah Chimata
Greenhorn

Joined: Aug 02, 2012
Posts: 5
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41800
    
  62
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?


Ping & DNS - my free Android networking tools app
Seshaiah Chimata
Greenhorn

Joined: Aug 02, 2012
Posts: 5
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.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

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

Joined: Aug 02, 2012
Posts: 5
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
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

It's been a while, but I believe tnsnames.ora is only used when you are using the "thick" oracle client.

WP
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Role of XE