Re: oracle instance_name vs. service_name

From: joel garry <joel-garry_at_home.com>
Date: Wed, 19 Nov 2008 14:50:58 -0800 (PST)
Message-ID: <59200ed3-b6bd-4667-a0d9-a51ae8aab953@w39g2000prb.googlegroups.com>


On Nov 19, 5:32 am, Laurenz Albe <inv..._at_spam.to.invalid> wrote:
> J?ns M?rtin Schl?tt?r <KmoEfrUew..._at_spammotel.com> wrote:
>
> > If I use sqlplus to connect to a database, I do it like that:
>
> > sqlplus user1/secr..._at_ora1.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:
>
> > jdbc:oracle: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
>
> jdbc:oracle:thin:@//ora1.mydomain.com:1583/db.prd1
>
> Yours,
> Laurenz Albe

http://download-west.oracle.com/docs/cd/B14117_01/java.101/b10979/urls.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/new-jdbc-url-syntax-for-oracle-10g-jdbc-driver/ So, judging from googling, at least, it's just an older syntax.

jg

--
@home.com is bogus.
http://www.signonsandiego.com/news/metro/20081119-9999-1n19simmons.html
Received on Wed Nov 19 2008 - 16:50:58 CST

Original text of this message