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 sube singh <su...@gmail.com> on 2005/08/12 11:08:04 UTC

To take multiple connection from a database after starting the network server

Hi,
 I have started the network server and create a database named "server". I 
have taken a connection
using JDBC Driver. After that tried to connection from same database using 
ij tool or do its vice - versa . It gave the following error message : 
 com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -1, SQLSTATE: 
XJ040, SQLERRMC: 
serverXJ040.CXSDB6:E:\Derby\frameworks\NetworkServer\bin\serverXSDB6.DFailed
to start database 'server', see the next exception for details.Another 
instance of Derby may have already booted the database 
E:\Derby\frameworks\NetworkServer\bin\server.(server log:derby.log)
 I hape that you will help me to understand the concept. 
 Thanks
 Regards,
 Sube Singh

Re: To take multiple connection from a database after starting the network server

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Sube,

Is it possible that you have brought up two copies of the Network 
Server, listening on different ports? Connecting to the same database 
through two servers would cause the error you're seeing. Granular Derby 
locks (among other objects) aren't shared across servers. When the first 
server opens a connection to a database, it seizes exclusive access to 
all activity inside that database. That exclusive access persists until 
a user explicitly shuts down the database.

-Rick

sube singh wrote:

> Hi,
>  
> I have started the network server and create a database named 
> "server". I have taken a connection
> using JDBC Driver. After that tried to connection from same database 
> using ij tool or do its vice - versa . It gave the following error 
> message :
>  
> com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -1, SQLSTATE: 
> XJ040, SQLERRMC: 
> serverXJ040.CXSDB6:E:\Derby\frameworks\NetworkServer\bin\serverXSDB6.DFailed 
> to start database 'server', see the next exception for 
> details.Another instance of Derby may have already booted the 
> database E:\Derby\frameworks\NetworkServer\bin\server.(server log: 
> derby.log)
>  
> I hape that you will help me to understand the concept.
>  
> Thanks
>  
> Regards,
>  
> Sube Singh
>  
>  
>  
>
>  



Re: To take multiple connection from a database after starting the network server

Posted by Mamta Satoor <ms...@gmail.com>.
Hi Sube,
 What url did you use in ij to connect to the database. Is it possible that 
you used the embedded url rather than network server url?
 Mamta

 On 8/12/05, sube singh <su...@gmail.com> wrote: 
> 
> Hi,
>  I have started the network server and create a database named "server". I 
> have taken a connection
> using JDBC Driver. After that tried to connection from same database using 
> ij tool or do its vice - versa . It gave the following error message : 
>  com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -1, SQLSTATE: 
> XJ040, SQLERRMC: 
> serverXJ040.CXSDB6:E:\Derby\frameworks\NetworkServer\bin\serverXSDB6.DFailed 
> to start database 'server', see the next exception for details.Another 
> instance of Derby may have already booted the database 
> E:\Derby\frameworks\NetworkServer\bin\server.(server log: derby.log)
>  I hape that you will help me to understand the concept. 
>  Thanks
>  Regards,
>  Sube Singh
>    
>