db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: A question about derby connection type
Date Fri, 21 Apr 2006 15:06:45 GMT
duhee.lee@kdtrading.com wrote:

>I changed the property of 'db.lck' to read only to make a read only
>connection to derby.
>I assumed that I can make read& write connection to derby  when I change
>'db.lck' to writable back.
>However, It didn't work as I assumed. I tried to create an index but I
>got an error saying that 'DDL is not permitted for a read-only
>connection, user or database.'  Anyone knows how I can make a
>read&write connection again??
Hi Duhee -

db.lck is a Derby system file that should never be modified directly.  
The use that Derby makes of db.lck requires only that it be accessed at 
boot and shutdown time - any modifications made to the file between 
those two events will not be noticed. 

You have tried something that, to my knowledge, has not been tried 
before (and is unsupported and won't work).  The read-only attribute is 
associated with a connection and should be set when the connection is 
created or by using Authorization and a read-only user account or by 
creating a read-only database as documented in the manuals.  Read-only  
is set when the connection is created - it persists for the life of the 
connection.  As you discovered if Derby cannot write to the db.lck file 
it will make all connections read-only, this is an artifact rather than 
a feature. 

View raw message