dbTalk Databases Forums  

oracle instance_name vs. service_name

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss oracle instance_name vs. service_name in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JĊns MÁrtin SchlÁttĊr
 
Posts: n/a

Default oracle instance_name vs. service_name - 11-19-2008 , 06:24 AM






If I use sqlplus to connect to a database, I do it like that:

sqlplus user1/secret1 (AT) ora1 (DOT) mydomain.com:1583/db.prd1

where db.prd1 is the service_name.

If I do the connect through JDBC, the connection url is:

jdbcracle:thin:@ora1.mydomain.com:1583:db1

SQLPLUS uses the service name, whereas JDBC uses the instance_name
(resp. sid).

How does this work? Is the oracle protocol so that either instance
name or service name can be used?

Martin

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 07:32 AM






J?ns M?rtin Schl?tt?r <KmoEfrUewEbx (AT) spammotel (DOT) com> wrote:
Quote:
If I use sqlplus to connect to a database, I do it like that:

sqlplus user1/secret1 (AT) ora1 (DOT) mydomain.com:1583/db.prd1

where db.prd1 is the service_name.
That's using the EZCONNECT syntax, ok.

Quote:
If I do the connect through JDBC, the connection url is:

jdbcracle:thin:@ora1.mydomain.com:1583:db1

SQLPLUS uses the service name, whereas JDBC uses the instance_name
(resp. sid).

How does this work? Is the oracle protocol so that either instance
name or service name can be used?
I am surprised that this URL works, as indeed it does.

I cannot find this form under the supported Syntaxes in
http://download-uk.oracle.com/docs/c...s.htm#BEICDECB

According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 07:32 AM



J?ns M?rtin Schl?tt?r <KmoEfrUewEbx (AT) spammotel (DOT) com> wrote:
Quote:
If I use sqlplus to connect to a database, I do it like that:

sqlplus user1/secret1 (AT) ora1 (DOT) mydomain.com:1583/db.prd1

where db.prd1 is the service_name.
That's using the EZCONNECT syntax, ok.

Quote:
If I do the connect through JDBC, the connection url is:

jdbcracle:thin:@ora1.mydomain.com:1583:db1

SQLPLUS uses the service name, whereas JDBC uses the instance_name
(resp. sid).

How does this work? Is the oracle protocol so that either instance
name or service name can be used?
I am surprised that this URL works, as indeed it does.

I cannot find this form under the supported Syntaxes in
http://download-uk.oracle.com/docs/c...s.htm#BEICDECB

According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1

Yours,
Laurenz Albe


Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 07:32 AM



J?ns M?rtin Schl?tt?r <KmoEfrUewEbx (AT) spammotel (DOT) com> wrote:
Quote:
If I use sqlplus to connect to a database, I do it like that:

sqlplus user1/secret1 (AT) ora1 (DOT) mydomain.com:1583/db.prd1

where db.prd1 is the service_name.
That's using the EZCONNECT syntax, ok.

Quote:
If I do the connect through JDBC, the connection url is:

jdbcracle:thin:@ora1.mydomain.com:1583:db1

SQLPLUS uses the service name, whereas JDBC uses the instance_name
(resp. sid).

How does this work? Is the oracle protocol so that either instance
name or service name can be used?
I am surprised that this URL works, as indeed it does.

I cannot find this form under the supported Syntaxes in
http://download-uk.oracle.com/docs/c...s.htm#BEICDECB

According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 07:32 AM



J?ns M?rtin Schl?tt?r <KmoEfrUewEbx (AT) spammotel (DOT) com> wrote:
Quote:
If I use sqlplus to connect to a database, I do it like that:

sqlplus user1/secret1 (AT) ora1 (DOT) mydomain.com:1583/db.prd1

where db.prd1 is the service_name.
That's using the EZCONNECT syntax, ok.

Quote:
If I do the connect through JDBC, the connection url is:

jdbcracle:thin:@ora1.mydomain.com:1583:db1

SQLPLUS uses the service name, whereas JDBC uses the instance_name
(resp. sid).

How does this work? Is the oracle protocol so that either instance
name or service name can be used?
I am surprised that this URL works, as indeed it does.

I cannot find this form under the supported Syntaxes in
http://download-uk.oracle.com/docs/c...s.htm#BEICDECB

According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1

Yours,
Laurenz Albe


Reply With Quote
  #6  
Old   
JĊns MÁrtin SchlÁttĊr
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 09:50 AM



Quote:
According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1
You are right, this also works. Thanks!

Martin


Reply With Quote
  #7  
Old   
JĊns MÁrtin SchlÁttĊr
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 09:50 AM



Quote:
According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1
You are right, this also works. Thanks!

Martin


Reply With Quote
  #8  
Old   
JĊns MÁrtin SchlÁttĊr
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 09:50 AM



Quote:
According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1
You are right, this also works. Thanks!

Martin


Reply With Quote
  #9  
Old   
JĊns MÁrtin SchlÁttĊr
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 09:50 AM



Quote:
According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1
You are right, this also works. Thanks!

Martin


Reply With Quote
  #10  
Old   
joel garry
 
Posts: n/a

Default Re: oracle instance_name vs. service_name - 11-19-2008 , 04:50 PM



On Nov 19, 5:32*am, Laurenz Albe <inv... (AT) spam (DOT) to.invalid> wrote:
Quote:
J?ns M?rtin Schl?tt?r <KmoEfrUew... (AT) spammotel (DOT) com> wrote:

If I use sqlplus to connect to a database, I do it like that:

sqlplus user1/secr... (AT) ora1 (DOT) mydomain.com:1583/db.prd1

where db.prd1 is the service_name.

That's using the EZCONNECT syntax, ok.

If I do the connect through JDBC, the connection url is:

jdbcracle:thin:@ora1.mydomain.com:1583:db1

SQLPLUS uses the service name, whereas JDBC uses the instance_name
(resp. sid).

How does this work? Is the oracle protocol so that either instance
name or service name can be used?

I am surprised that this URL works, as indeed it does.

I cannot find this form under the supported Syntaxes inhttp://download-uk..oracle.com/docs/cd/B19306_01/java.102/b14355/urls....

According to the documentation, it should be

jdbcracle:thin:@//ora1.mydomain.com:1583/db.prd1

Yours,
Laurenz Albe
http://download-west.oracle.com/docs...s.htm#g1073263
and scroll down a bit to "If you are using the Thin or OCI drivers,
note the following:"

Found in a google search of:
jdbc thin style syntax
which led to http://twit88.com/blog/2008/05/29/ne...g-jdbc-driver/
So, judging from googling, at least, it's just an older syntax.

jg
--
@home.com is bogus.
http://www.signonsandiego.com/news/m...19simmons.html


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.