You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Maryam Moazeni <mm...@gmail.com> on 2006/05/20 22:16:35 UTC
Derby Protocols
Hi,
What is the difference between this
"jdbc:derby://localhost:1527/"
AND
"jdbc:derby:net://localhost:1527/" ??
Thanks in advance,
--Maryam
Re: Derby Protocols
Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
Maryam Moazeni wrote:
> Hi,
>
> What is the difference between this
>
> "jdbc:derby://localhost:1527/"
>
> AND
>
> "jdbc:derby:net://localhost:1527/" ??
"jdbc:derby://localhost:1527/" is the connection URL syntax used by the
derby network client driver (derbyclient.jar). Summary info is at:
http://db.apache.org/derby/docs/10.1/adminguide/cadminappsclient.html
"jdbc:derby:net://localhost:1527/" is the connection URL for the IBM DB2
Universal driver (db2jcc.jar). Summary info is at:
http://db.apache.org/derby/docs/10.1/adminguide/cadminapps810777.html
There are a couple other syntax differences between the two that I have
gotten tripped up on before. For example, with the db2jcc.jar driver,
there's a colon after the dbname and a semicolon at the end:
'jdbc:derby:net://localhost:1527/bookstore:user=app;password=app;'
The embedded and the derby network client drivers both have a semicolon
after the db name and nothing at the end:
Derby network client driver:
'jdbc:derby://localhost:1527/bookstore;user=app;password=app'
Embedded driver:
'jdbc:derby:bookstore;user=app;password=app'
I hope this helps.
regards,
-jean
Re: Derby Protocols
Posted by Maryam Moazeni <mm...@gmail.com>.
Great, Thank a lot.
--Maryam
On 5/21/06, Andrew McIntyre <mc...@gmail.com> wrote:
>
> On 5/20/06, Maryam Moazeni <mm...@gmail.com> wrote:
> >
> > What is the difference between this
> >
> > "jdbc:derby://localhost:1527/"
>
> This form is used when connecting to the network server with the Derby
> network client driver, from derbyclient.jar.
>
> > AND
> >
> > "jdbc:derby:net://localhost:1527/" ??
>
> This form is used to connect to the network server with the DB2
> Universal JDBC driver, from db2jcc.jar
>
> best regards,
> andrew
>
Re: Derby Protocols
Posted by Andrew McIntyre <mc...@gmail.com>.
On 5/20/06, Maryam Moazeni <mm...@gmail.com> wrote:
>
> What is the difference between this
>
> "jdbc:derby://localhost:1527/"
This form is used when connecting to the network server with the Derby
network client driver, from derbyclient.jar.
> AND
>
> "jdbc:derby:net://localhost:1527/" ??
This form is used to connect to the network server with the DB2
Universal JDBC driver, from db2jcc.jar
best regards,
andrew
Re: Derby Protocols
Posted by Suavi Ali Demir <de...@yahoo.com>.
derby:net is to connect to the network server, which could be running on another machine. it has host:port to connect to. You start the derby network server and it runs as a database server to serve many clients.
jdbc:derby:dbname is used to connect to a local database in embedded mode (derby classes run as part of your application). in this case, derby is not running as a server listening on a port number. your application is the database engine in that case. there is no host:port in such urls. URL could be like:
jdbc:derby:c:\databases\myproducts
only 1 process at a time can use a local database using jdbc:derby:dbname connection.
regards,
ali
Maryam Moazeni <mm...@gmail.com> wrote:
Hi,
What is the difference between this
"jdbc:derby://localhost:1527/"
AND
"jdbc:derby:net://localhost:1527/" ??
Thanks in advance,
--Maryam