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 johny_quest <iv...@yahoo.com> on 2011/09/09 17:02:01 UTC

Move from embedded to network server

Hello guys, 
I have the following situation, that I have tried to solve for a couple of
week but I can't seem to get it working.
Here is the deal.

I have a derby database that is running in embedded mode as a part of an
application (IBM Director software runs Apache Derby database by default).

What I have to do, is to connect another type of software to that database
using ODBC connector.

First I read about the fact, that only one connection is possibla at a time.
I tried to connect to the database with razorSQL just to see if I can
connect, but the error is:

DERBY SQL error: SQLCODE:
-1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
Files/IBM/Director/database' with class loader
sun.misc.Launcher$AppClassLoader@11b86e7,
see the next exception
for details.::SQLSTATE: XSDB6Another instance of Derby may
have already booted the database C:\Program Files\IBM\Director\database.

After that I installed a new apache derby and set it in network mode. I had
to change the port to 1528 because obviously the other instance is listening
on 1527. Using the new setting I managed to connect to the server, create
database and tables etc. - it is working, but I still cannot connect to the
needed database. The error is the same.

Please, can someone suggest a solution for this problem.
I will be very grateful.

-- 
View this message in context: http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Move from embedded to network server

Posted by Kristian Waagan <kr...@oracle.com>.
On 12.09.11 12:36, johny_quest wrote:
>
> Hmm, this might be interesting. My goal is to change as little as possible in
> IBM Director configuration, so this might be good for me. Otherwise there is
> no difference because IBM Director is always ON, so the network server will
> also be available at any time. Can you tell me how to achieve this
> configuration.

I believe José Ventura already answered this, but here it is again:
http://db.apache.org/derby/docs/10.8/adminguide/radminconfigstartnetworkserver.html

BTW, all the docs can be found here: 
http://db.apache.org/derby/manuals/index.html


-- 
Kristian

> Thank you.
>
>
>
> Kristian Waagan-2 wrote:
>>
>> On 12.09.11 11:21, johny_quest wrote:
>>>
>>> Ok, lets see if I got you correctly:
>>>
>>> I stop IBM Director.
>>> I start the Derby Network Server giving it the database directory as home
>>> (is this done within the start command?)
>>> I then reconfigure IBM Director to connect with the network mode url (not
>>> the embedded) and the new port number (because I set the Network server
>>> to
>>> listen on port 1528).
>>>
>>> I should then be able to connect simultaniously from more than one
>>> clients,
>>> right?
>>
>> Yes.
>>
>> There is also another option;
>> Let IBM Director connect to Derby using the embedded driver and have it
>> in addition start the network server. This can be done by setting a
>> system property.
>>
>> The advantages of the embedded server scenario above would be that the
>> "main application" can connect using the embedded driver, and that the
>> network server will live and die with the main application.
>> I don't know if this is something you want, but thought I'd mention the
>> possibility.
>>
>>
>> Regards,
>> --
>> Kristian
>>
>>>
>>>
>>> José Ventura-3 wrote:
>>>>
>>>> Derby only allows one instance *of the database software* (RDBMS) to
>>>> open
>>>> the files in a directory at a time. According to the error you received,
>>>> there already is an instance of the RDBMS open on c:/Program
>>>> Files/IBM/Director/database (probably started by an embedded connection
>>>> in
>>>> IBM Director).
>>>>
>>>> Even if you use Derby Network Server, you will still be limited to one
>>>> instance *of the database software*, however this instance will accept
>>>> connections from any number of *clients*.
>>>>
>>>> I think what you want to do is stop IBM Director, then start Derby
>>>> Network
>>>> Server upon that directory, then configure IBM Director to use a client
>>>> connection instead of an embedded connection. That way, both Director
>>>> and
>>>> other clients (such as razorSQL) will be able to connect, read and write
>>>> data to the database.
>>>>
>>>> - José
>>>>
>>>> On Fri, Sep 9, 2011 at 12:02 PM, johny_quest<iv...@yahoo.com>
>>>> wrote:
>>>>
>>>>>
>>>>> Hello guys,
>>>>> I have the following situation, that I have tried to solve for a couple
>>>>> of
>>>>> week but I can't seem to get it working.
>>>>> Here is the deal.
>>>>>
>>>>> I have a derby database that is running in embedded mode as a part of
>>>>> an
>>>>> application (IBM Director software runs Apache Derby database by
>>>>> default).
>>>>>
>>>>> What I have to do, is to connect another type of software to that
>>>>> database
>>>>> using ODBC connector.
>>>>>
>>>>> First I read about the fact, that only one connection is possibla at a
>>>>> time.
>>>>> I tried to connect to the database with razorSQL just to see if I can
>>>>> connect, but the error is:
>>>>>
>>>>> DERBY SQL error: SQLCODE:
>>>>> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
>>>>> Files/IBM/Director/database' with class loader
>>>>> sun.misc.Launcher$AppClassLoader@11b86e7,
>>>>> see the next exception
>>>>> for details.::SQLSTATE: XSDB6Another instance of Derby may
>>>>> have already booted the database C:\Program
>>>>> Files\IBM\Director\database.
>>>>>
>>>>> After that I installed a new apache derby and set it in network mode. I
>>>>> had
>>>>> to change the port to 1528 because obviously the other instance is
>>>>> listening
>>>>> on 1527. Using the new setting I managed to connect to the server,
>>>>> create
>>>>> database and tables etc. - it is working, but I still cannot connect to
>>>>> the
>>>>> needed database. The error is the same.
>>>>>
>>>>> Please, can someone suggest a solution for this problem.
>>>>> I will be very grateful.
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
>>>>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>>
>


Re: Move from embedded to network server

Posted by johny_quest <iv...@yahoo.com>.
Hmm, this might be interesting. My goal is to change as little as possible in
IBM Director configuration, so this might be good for me. Otherwise there is
no difference because IBM Director is always ON, so the network server will
also be available at any time. Can you tell me how to achieve this
configuration.
Thank you.



Kristian Waagan-2 wrote:
> 
> On 12.09.11 11:21, johny_quest wrote:
>>
>> Ok, lets see if I got you correctly:
>>
>> I stop IBM Director.
>> I start the Derby Network Server giving it the database directory as home
>> (is this done within the start command?)
>> I then reconfigure IBM Director to connect with the network mode url (not
>> the embedded) and the new port number (because I set the Network server
>> to
>> listen on port 1528).
>>
>> I should then be able to connect simultaniously from more than one
>> clients,
>> right?
> 
> Yes.
> 
> There is also another option;
> Let IBM Director connect to Derby using the embedded driver and have it 
> in addition start the network server. This can be done by setting a 
> system property.
> 
> The advantages of the embedded server scenario above would be that the 
> "main application" can connect using the embedded driver, and that the 
> network server will live and die with the main application.
> I don't know if this is something you want, but thought I'd mention the 
> possibility.
> 
> 
> Regards,
> -- 
> Kristian
> 
>>
>>
>> José Ventura-3 wrote:
>>>
>>> Derby only allows one instance *of the database software* (RDBMS) to
>>> open
>>> the files in a directory at a time. According to the error you received,
>>> there already is an instance of the RDBMS open on c:/Program
>>> Files/IBM/Director/database (probably started by an embedded connection
>>> in
>>> IBM Director).
>>>
>>> Even if you use Derby Network Server, you will still be limited to one
>>> instance *of the database software*, however this instance will accept
>>> connections from any number of *clients*.
>>>
>>> I think what you want to do is stop IBM Director, then start Derby
>>> Network
>>> Server upon that directory, then configure IBM Director to use a client
>>> connection instead of an embedded connection. That way, both Director
>>> and
>>> other clients (such as razorSQL) will be able to connect, read and write
>>> data to the database.
>>>
>>> - José
>>>
>>> On Fri, Sep 9, 2011 at 12:02 PM, johny_quest<iv...@yahoo.com> 
>>> wrote:
>>>
>>>>
>>>> Hello guys,
>>>> I have the following situation, that I have tried to solve for a couple
>>>> of
>>>> week but I can't seem to get it working.
>>>> Here is the deal.
>>>>
>>>> I have a derby database that is running in embedded mode as a part of
>>>> an
>>>> application (IBM Director software runs Apache Derby database by
>>>> default).
>>>>
>>>> What I have to do, is to connect another type of software to that
>>>> database
>>>> using ODBC connector.
>>>>
>>>> First I read about the fact, that only one connection is possibla at a
>>>> time.
>>>> I tried to connect to the database with razorSQL just to see if I can
>>>> connect, but the error is:
>>>>
>>>> DERBY SQL error: SQLCODE:
>>>> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
>>>> Files/IBM/Director/database' with class loader
>>>> sun.misc.Launcher$AppClassLoader@11b86e7,
>>>> see the next exception
>>>> for details.::SQLSTATE: XSDB6Another instance of Derby may
>>>> have already booted the database C:\Program
>>>> Files\IBM\Director\database.
>>>>
>>>> After that I installed a new apache derby and set it in network mode. I
>>>> had
>>>> to change the port to 1528 because obviously the other instance is
>>>> listening
>>>> on 1527. Using the new setting I managed to connect to the server,
>>>> create
>>>> database and tables etc. - it is working, but I still cannot connect to
>>>> the
>>>> needed database. The error is the same.
>>>>
>>>> Please, can someone suggest a solution for this problem.
>>>> I will be very grateful.
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
>>>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32446759.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Move from embedded to network server

Posted by Kristian Waagan <kr...@oracle.com>.
On 12.09.11 11:21, johny_quest wrote:
>
> Ok, lets see if I got you correctly:
>
> I stop IBM Director.
> I start the Derby Network Server giving it the database directory as home
> (is this done within the start command?)
> I then reconfigure IBM Director to connect with the network mode url (not
> the embedded) and the new port number (because I set the Network server to
> listen on port 1528).
>
> I should then be able to connect simultaniously from more than one clients,
> right?

Yes.

There is also another option;
Let IBM Director connect to Derby using the embedded driver and have it 
in addition start the network server. This can be done by setting a 
system property.

The advantages of the embedded server scenario above would be that the 
"main application" can connect using the embedded driver, and that the 
network server will live and die with the main application.
I don't know if this is something you want, but thought I'd mention the 
possibility.


Regards,
-- 
Kristian

>
>
> José Ventura-3 wrote:
>>
>> Derby only allows one instance *of the database software* (RDBMS) to open
>> the files in a directory at a time. According to the error you received,
>> there already is an instance of the RDBMS open on c:/Program
>> Files/IBM/Director/database (probably started by an embedded connection in
>> IBM Director).
>>
>> Even if you use Derby Network Server, you will still be limited to one
>> instance *of the database software*, however this instance will accept
>> connections from any number of *clients*.
>>
>> I think what you want to do is stop IBM Director, then start Derby Network
>> Server upon that directory, then configure IBM Director to use a client
>> connection instead of an embedded connection. That way, both Director and
>> other clients (such as razorSQL) will be able to connect, read and write
>> data to the database.
>>
>> - José
>>
>> On Fri, Sep 9, 2011 at 12:02 PM, johny_quest<iv...@yahoo.com>  wrote:
>>
>>>
>>> Hello guys,
>>> I have the following situation, that I have tried to solve for a couple
>>> of
>>> week but I can't seem to get it working.
>>> Here is the deal.
>>>
>>> I have a derby database that is running in embedded mode as a part of an
>>> application (IBM Director software runs Apache Derby database by
>>> default).
>>>
>>> What I have to do, is to connect another type of software to that
>>> database
>>> using ODBC connector.
>>>
>>> First I read about the fact, that only one connection is possibla at a
>>> time.
>>> I tried to connect to the database with razorSQL just to see if I can
>>> connect, but the error is:
>>>
>>> DERBY SQL error: SQLCODE:
>>> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
>>> Files/IBM/Director/database' with class loader
>>> sun.misc.Launcher$AppClassLoader@11b86e7,
>>> see the next exception
>>> for details.::SQLSTATE: XSDB6Another instance of Derby may
>>> have already booted the database C:\Program Files\IBM\Director\database.
>>>
>>> After that I installed a new apache derby and set it in network mode. I
>>> had
>>> to change the port to 1528 because obviously the other instance is
>>> listening
>>> on 1527. Using the new setting I managed to connect to the server, create
>>> database and tables etc. - it is working, but I still cannot connect to
>>> the
>>> needed database. The error is the same.
>>>
>>> Please, can someone suggest a solution for this problem.
>>> I will be very grateful.
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
>>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>


Re: Move from embedded to network server

Posted by johny_quest <iv...@yahoo.com>.
Thank you guys for your help. I am still trying to get the system working,
and I will write if I face other problems. 
-- 
View this message in context: http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32477068.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Move from embedded to network server

Posted by José Ventura <st...@gmail.com>.
To make the embedded connection start a network server instead of an
embedded server, use the following property:

http://db.apache.org/derby/docs/10.5/adminguide/radminconfigstartnetworkserver.html

I think that page links to other useful properties in this scenario
(derby.drda.*).

On Mon, Sep 12, 2011 at 7:42 AM, johny_quest <iv...@yahoo.com> wrote:

>
> I checked the configuration options for IBM Director and Derby and here are
> the available options:
>
>
> ;==============================================================================
> ; Apache Derby
>
> ;==============================================================================
> DbmsApplication = Apache Derby
> DbmsTcpIpListenerPort = 1527
> DbmsServerName = localhost
> DbmsDatabaseName = database
> DbmsUserId = tioadmin
> DbmsPassword = **
> DbmsDatabaseAppHome = C:\Program
>
> Files\IBM\Director\lwi\runtime\database\eclipse\plugins\org.apache.derby.core_10.5.3.1
> DbmsDatabaseHome = C:\Program Files\IBM\Director
>
> I can change the port here, probably I have to set the IP or host name
> instead of localhost, but there is no url to specify. Maybe I should change
> the DatabaseAppHome to where derby network server is installed (the lib
> folder with the java files).
>
>
> José Ventura-3 wrote:
> >
> > That's about right.
> >
> > I usually specify the directory I want by opening a command prompt in the
> > parent directory. For example, if the files are located in
> > C:/derby/databases/mydb, then I open a prompt in C:/derby/databases and
> > issue the start command from there. There are probably other ways to do
> > it,
> > check the documentation.
> >
> > In the above example, the URL you would use (both in Director and other
> > clients) would be "jdbc:derby://host:port/mydb" (note the database name,
> > which is the name of a subdirectory where derby was started).
> >
> > Hope that helps.
> >
> > On Mon, Sep 12, 2011 at 6:21 AM, johny_quest <iv...@yahoo.com>
> wrote:
> >
> >>
> >> Ok, lets see if I got you correctly:
> >>
> >> I stop IBM Director.
> >> I start the Derby Network Server giving it the database directory as
> home
> >> (is this done within the start command?)
> >> I then reconfigure IBM Director to connect with the network mode url
> (not
> >> the embedded) and the new port number (because I set the Network server
> >> to
> >> listen on port 1528).
> >>
> >> I should then be able to connect simultaniously from more than one
> >> clients,
> >> right?
> >>
> >>
> >> José Ventura-3 wrote:
> >> >
> >> > Derby only allows one instance *of the database software* (RDBMS) to
> >> open
> >> > the files in a directory at a time. According to the error you
> >> received,
> >> > there already is an instance of the RDBMS open on c:/Program
> >> > Files/IBM/Director/database (probably started by an embedded
> connection
> >> in
> >> > IBM Director).
> >> >
> >> > Even if you use Derby Network Server, you will still be limited to one
> >> > instance *of the database software*, however this instance will accept
> >> > connections from any number of *clients*.
> >> >
> >> > I think what you want to do is stop IBM Director, then start Derby
> >> Network
> >> > Server upon that directory, then configure IBM Director to use a
> client
> >> > connection instead of an embedded connection. That way, both Director
> >> and
> >> > other clients (such as razorSQL) will be able to connect, read and
> >> write
> >> > data to the database.
> >> >
> >> > - José
> >> >
> >> > On Fri, Sep 9, 2011 at 12:02 PM, johny_quest <iv...@yahoo.com>
> >> wrote:
> >> >
> >> >>
> >> >> Hello guys,
> >> >> I have the following situation, that I have tried to solve for a
> >> couple
> >> >> of
> >> >> week but I can't seem to get it working.
> >> >> Here is the deal.
> >> >>
> >> >> I have a derby database that is running in embedded mode as a part of
> >> an
> >> >> application (IBM Director software runs Apache Derby database by
> >> >> default).
> >> >>
> >> >> What I have to do, is to connect another type of software to that
> >> >> database
> >> >> using ODBC connector.
> >> >>
> >> >> First I read about the fact, that only one connection is possibla at
> a
> >> >> time.
> >> >> I tried to connect to the database with razorSQL just to see if I can
> >> >> connect, but the error is:
> >> >>
> >> >> DERBY SQL error: SQLCODE:
> >> >> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
> >> >> Files/IBM/Director/database' with class loader
> >> >> sun.misc.Launcher$AppClassLoader@11b86e7,
> >> >> see the next exception
> >> >> for details.::SQLSTATE: XSDB6Another instance of Derby may
> >> >> have already booted the database C:\Program
> >> Files\IBM\Director\database.
> >> >>
> >> >> After that I installed a new apache derby and set it in network mode.
> >> I
> >> >> had
> >> >> to change the port to 1528 because obviously the other instance is
> >> >> listening
> >> >> on 1527. Using the new setting I managed to connect to the server,
> >> create
> >> >> database and tables etc. - it is working, but I still cannot connect
> >> to
> >> >> the
> >> >> needed database. The error is the same.
> >> >>
> >> >> Please, can someone suggest a solution for this problem.
> >> >> I will be very grateful.
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
> >> >> Sent from the Apache Derby Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32446393.html
> >> Sent from the Apache Derby Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32446785.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>
>

Re: Move from embedded to network server

Posted by johny_quest <iv...@yahoo.com>.
I checked the configuration options for IBM Director and Derby and here are
the available options:

;==============================================================================
; Apache Derby
;==============================================================================
DbmsApplication = Apache Derby
DbmsTcpIpListenerPort = 1527
DbmsServerName = localhost
DbmsDatabaseName = database
DbmsUserId = tioadmin
DbmsPassword = **
DbmsDatabaseAppHome = C:\Program
Files\IBM\Director\lwi\runtime\database\eclipse\plugins\org.apache.derby.core_10.5.3.1
DbmsDatabaseHome = C:\Program Files\IBM\Director

I can change the port here, probably I have to set the IP or host name
instead of localhost, but there is no url to specify. Maybe I should change
the DatabaseAppHome to where derby network server is installed (the lib
folder with the java files). 


José Ventura-3 wrote:
> 
> That's about right.
> 
> I usually specify the directory I want by opening a command prompt in the
> parent directory. For example, if the files are located in
> C:/derby/databases/mydb, then I open a prompt in C:/derby/databases and
> issue the start command from there. There are probably other ways to do
> it,
> check the documentation.
> 
> In the above example, the URL you would use (both in Director and other
> clients) would be "jdbc:derby://host:port/mydb" (note the database name,
> which is the name of a subdirectory where derby was started).
> 
> Hope that helps.
> 
> On Mon, Sep 12, 2011 at 6:21 AM, johny_quest <iv...@yahoo.com> wrote:
> 
>>
>> Ok, lets see if I got you correctly:
>>
>> I stop IBM Director.
>> I start the Derby Network Server giving it the database directory as home
>> (is this done within the start command?)
>> I then reconfigure IBM Director to connect with the network mode url (not
>> the embedded) and the new port number (because I set the Network server
>> to
>> listen on port 1528).
>>
>> I should then be able to connect simultaniously from more than one
>> clients,
>> right?
>>
>>
>> José Ventura-3 wrote:
>> >
>> > Derby only allows one instance *of the database software* (RDBMS) to
>> open
>> > the files in a directory at a time. According to the error you
>> received,
>> > there already is an instance of the RDBMS open on c:/Program
>> > Files/IBM/Director/database (probably started by an embedded connection
>> in
>> > IBM Director).
>> >
>> > Even if you use Derby Network Server, you will still be limited to one
>> > instance *of the database software*, however this instance will accept
>> > connections from any number of *clients*.
>> >
>> > I think what you want to do is stop IBM Director, then start Derby
>> Network
>> > Server upon that directory, then configure IBM Director to use a client
>> > connection instead of an embedded connection. That way, both Director
>> and
>> > other clients (such as razorSQL) will be able to connect, read and
>> write
>> > data to the database.
>> >
>> > - José
>> >
>> > On Fri, Sep 9, 2011 at 12:02 PM, johny_quest <iv...@yahoo.com>
>> wrote:
>> >
>> >>
>> >> Hello guys,
>> >> I have the following situation, that I have tried to solve for a
>> couple
>> >> of
>> >> week but I can't seem to get it working.
>> >> Here is the deal.
>> >>
>> >> I have a derby database that is running in embedded mode as a part of
>> an
>> >> application (IBM Director software runs Apache Derby database by
>> >> default).
>> >>
>> >> What I have to do, is to connect another type of software to that
>> >> database
>> >> using ODBC connector.
>> >>
>> >> First I read about the fact, that only one connection is possibla at a
>> >> time.
>> >> I tried to connect to the database with razorSQL just to see if I can
>> >> connect, but the error is:
>> >>
>> >> DERBY SQL error: SQLCODE:
>> >> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
>> >> Files/IBM/Director/database' with class loader
>> >> sun.misc.Launcher$AppClassLoader@11b86e7,
>> >> see the next exception
>> >> for details.::SQLSTATE: XSDB6Another instance of Derby may
>> >> have already booted the database C:\Program
>> Files\IBM\Director\database.
>> >>
>> >> After that I installed a new apache derby and set it in network mode.
>> I
>> >> had
>> >> to change the port to 1528 because obviously the other instance is
>> >> listening
>> >> on 1527. Using the new setting I managed to connect to the server,
>> create
>> >> database and tables etc. - it is working, but I still cannot connect
>> to
>> >> the
>> >> needed database. The error is the same.
>> >>
>> >> Please, can someone suggest a solution for this problem.
>> >> I will be very grateful.
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
>> >> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32446393.html
>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32446785.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Move from embedded to network server

Posted by José Ventura <st...@gmail.com>.
That's about right.

I usually specify the directory I want by opening a command prompt in the
parent directory. For example, if the files are located in
C:/derby/databases/mydb, then I open a prompt in C:/derby/databases and
issue the start command from there. There are probably other ways to do it,
check the documentation.

In the above example, the URL you would use (both in Director and other
clients) would be "jdbc:derby://host:port/mydb" (note the database name,
which is the name of a subdirectory where derby was started).

Hope that helps.

On Mon, Sep 12, 2011 at 6:21 AM, johny_quest <iv...@yahoo.com> wrote:

>
> Ok, lets see if I got you correctly:
>
> I stop IBM Director.
> I start the Derby Network Server giving it the database directory as home
> (is this done within the start command?)
> I then reconfigure IBM Director to connect with the network mode url (not
> the embedded) and the new port number (because I set the Network server to
> listen on port 1528).
>
> I should then be able to connect simultaniously from more than one clients,
> right?
>
>
> José Ventura-3 wrote:
> >
> > Derby only allows one instance *of the database software* (RDBMS) to open
> > the files in a directory at a time. According to the error you received,
> > there already is an instance of the RDBMS open on c:/Program
> > Files/IBM/Director/database (probably started by an embedded connection
> in
> > IBM Director).
> >
> > Even if you use Derby Network Server, you will still be limited to one
> > instance *of the database software*, however this instance will accept
> > connections from any number of *clients*.
> >
> > I think what you want to do is stop IBM Director, then start Derby
> Network
> > Server upon that directory, then configure IBM Director to use a client
> > connection instead of an embedded connection. That way, both Director and
> > other clients (such as razorSQL) will be able to connect, read and write
> > data to the database.
> >
> > - José
> >
> > On Fri, Sep 9, 2011 at 12:02 PM, johny_quest <iv...@yahoo.com>
> wrote:
> >
> >>
> >> Hello guys,
> >> I have the following situation, that I have tried to solve for a couple
> >> of
> >> week but I can't seem to get it working.
> >> Here is the deal.
> >>
> >> I have a derby database that is running in embedded mode as a part of an
> >> application (IBM Director software runs Apache Derby database by
> >> default).
> >>
> >> What I have to do, is to connect another type of software to that
> >> database
> >> using ODBC connector.
> >>
> >> First I read about the fact, that only one connection is possibla at a
> >> time.
> >> I tried to connect to the database with razorSQL just to see if I can
> >> connect, but the error is:
> >>
> >> DERBY SQL error: SQLCODE:
> >> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
> >> Files/IBM/Director/database' with class loader
> >> sun.misc.Launcher$AppClassLoader@11b86e7,
> >> see the next exception
> >> for details.::SQLSTATE: XSDB6Another instance of Derby may
> >> have already booted the database C:\Program Files\IBM\Director\database.
> >>
> >> After that I installed a new apache derby and set it in network mode. I
> >> had
> >> to change the port to 1528 because obviously the other instance is
> >> listening
> >> on 1527. Using the new setting I managed to connect to the server,
> create
> >> database and tables etc. - it is working, but I still cannot connect to
> >> the
> >> needed database. The error is the same.
> >>
> >> Please, can someone suggest a solution for this problem.
> >> I will be very grateful.
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
> >> Sent from the Apache Derby Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32446393.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>
>

Re: Move from embedded to network server

Posted by johny_quest <iv...@yahoo.com>.
Ok, lets see if I got you correctly:

I stop IBM Director.
I start the Derby Network Server giving it the database directory as home
(is this done within the start command?)
I then reconfigure IBM Director to connect with the network mode url (not
the embedded) and the new port number (because I set the Network server to
listen on port 1528).

I should then be able to connect simultaniously from more than one clients,
right?


José Ventura-3 wrote:
> 
> Derby only allows one instance *of the database software* (RDBMS) to open
> the files in a directory at a time. According to the error you received,
> there already is an instance of the RDBMS open on c:/Program
> Files/IBM/Director/database (probably started by an embedded connection in
> IBM Director).
> 
> Even if you use Derby Network Server, you will still be limited to one
> instance *of the database software*, however this instance will accept
> connections from any number of *clients*.
> 
> I think what you want to do is stop IBM Director, then start Derby Network
> Server upon that directory, then configure IBM Director to use a client
> connection instead of an embedded connection. That way, both Director and
> other clients (such as razorSQL) will be able to connect, read and write
> data to the database.
> 
> - José
> 
> On Fri, Sep 9, 2011 at 12:02 PM, johny_quest <iv...@yahoo.com> wrote:
> 
>>
>> Hello guys,
>> I have the following situation, that I have tried to solve for a couple
>> of
>> week but I can't seem to get it working.
>> Here is the deal.
>>
>> I have a derby database that is running in embedded mode as a part of an
>> application (IBM Director software runs Apache Derby database by
>> default).
>>
>> What I have to do, is to connect another type of software to that
>> database
>> using ODBC connector.
>>
>> First I read about the fact, that only one connection is possibla at a
>> time.
>> I tried to connect to the database with razorSQL just to see if I can
>> connect, but the error is:
>>
>> DERBY SQL error: SQLCODE:
>> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
>> Files/IBM/Director/database' with class loader
>> sun.misc.Launcher$AppClassLoader@11b86e7,
>> see the next exception
>> for details.::SQLSTATE: XSDB6Another instance of Derby may
>> have already booted the database C:\Program Files\IBM\Director\database.
>>
>> After that I installed a new apache derby and set it in network mode. I
>> had
>> to change the port to 1528 because obviously the other instance is
>> listening
>> on 1527. Using the new setting I managed to connect to the server, create
>> database and tables etc. - it is working, but I still cannot connect to
>> the
>> needed database. The error is the same.
>>
>> Please, can someone suggest a solution for this problem.
>> I will be very grateful.
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32446393.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Move from embedded to network server

Posted by José Ventura <st...@gmail.com>.
Derby only allows one instance *of the database software* (RDBMS) to open
the files in a directory at a time. According to the error you received,
there already is an instance of the RDBMS open on c:/Program
Files/IBM/Director/database (probably started by an embedded connection in
IBM Director).

Even if you use Derby Network Server, you will still be limited to one
instance *of the database software*, however this instance will accept
connections from any number of *clients*.

I think what you want to do is stop IBM Director, then start Derby Network
Server upon that directory, then configure IBM Director to use a client
connection instead of an embedded connection. That way, both Director and
other clients (such as razorSQL) will be able to connect, read and write
data to the database.

- José

On Fri, Sep 9, 2011 at 12:02 PM, johny_quest <iv...@yahoo.com> wrote:

>
> Hello guys,
> I have the following situation, that I have tried to solve for a couple of
> week but I can't seem to get it working.
> Here is the deal.
>
> I have a derby database that is running in embedded mode as a part of an
> application (IBM Director software runs Apache Derby database by default).
>
> What I have to do, is to connect another type of software to that database
> using ODBC connector.
>
> First I read about the fact, that only one connection is possibla at a
> time.
> I tried to connect to the database with razorSQL just to see if I can
> connect, but the error is:
>
> DERBY SQL error: SQLCODE:
> -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'c:/Program
> Files/IBM/Director/database' with class loader
> sun.misc.Launcher$AppClassLoader@11b86e7,
> see the next exception
> for details.::SQLSTATE: XSDB6Another instance of Derby may
> have already booted the database C:\Program Files\IBM\Director\database.
>
> After that I installed a new apache derby and set it in network mode. I had
> to change the port to 1528 because obviously the other instance is
> listening
> on 1527. Using the new setting I managed to connect to the server, create
> database and tables etc. - it is working, but I still cannot connect to the
> needed database. The error is the same.
>
> Please, can someone suggest a solution for this problem.
> I will be very grateful.
>
> --
> View this message in context:
> http://old.nabble.com/Move-from-embedded-to-network-server-tp32431926p32431926.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>
>