tags:

views:

35

answers:

3

what is the service name of oracle10g xe database

+1  A: 

It varies ragarding the network. In our local system it'll be 'localhost'

venJava
... `localhost` is the IP (127.0.0.1) if you have a local install of the oracle database. The service name is a different part of the connect string.
Andreas_D
+1  A: 

The jdbc url for a locally installed xe databse would look like this: jdbc:oracle:thin:@127.0.0.1:1521:XE, note that XE is the SID, a service name does not seem to be needed for jdbc.

Jörn Horstmann
You can assign different services to the same SID (eg for resource management purposes) using listener.ora. But by default you'll get a service with the same name as the sid, which is XE.
Gary
@Gary: Thanks for the clarification
Jörn Horstmann
A: 

Service name is ambigious. But as you asked about jdbc I guess you need advice on the service name that is used on the jdbc url.

Here is a good article with a link to oracle sources.

Basically it says that the format is

jdbc:oracle:thin:scott/tiger@//myhost:1521/myservicename

and myservicename can be found in TNSNAMES.ORA.

Andreas_D