db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: Hard upgrade failing?
Date Tue, 02 Jun 2009 15:37:31 GMT
Evan Leonard wrote:
>
> Kristian, Myrna,
> Thank you for the replies.
>
> Before I try some of your suggestions, can you tell me more about this:
>
>> Or perhaps your 'upgrade=true' connection was not the first 
>> connection to
>> the db with 10.5 jars?
>
>
> I'm sure that right now I'm connecting in a soft upgrade mode first in 
> our application. I've added the derby upgrade to the schema upgrade 
> workflow when upgrading the application. As part of this workflow I 
> first connect to the db to check the current schema version. If I 
> understand what you're saying Myrna this won't work as the 
> "upgrade=true" connection must be the very first one made in the JMV 
> session to the derby db?
>
I think Myrna is right that the upgrade=true has to be the connection 
that  boots the database, so you can't expect upgrade to work if you 
have already connected in soft upgrade.   I don't see the error Myrna 
describes though.  For me it just seems to silently connect but leaves 
the database in 10.1 format as you described.  Of course if I shutdown 
the database and reconnect with upgrade=true it upgrades properly.  
Below are some ij experiments.  I do think it would be good to make this 
clearer in the documentation and perhaps issue a warning when 
upgrade=true is specified but no upgrade can be performed.

ij version 10.5
ij> connect 'jdbc:derby:wombat';
ij> values syscs_util.syscs_get_database_property( 
'DataDictionaryVersion' ) ;
1

--------------------------------------------------------------------------------------------------------------
--------
10.1


1 row selected
ij> connect 'jdbc:derby:wombat;upgrade=true';
ij(CONNECTION1)> values syscs_util.syscs_get_database_property( 
'DataDictionaryVersion' ) ;
1

--------------------------------------------------------------------------------------------------------------
--------
10.1


1 row selected
ij(CONNECTION1)> connect 'jdbc:derby:wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij(CONNECTION1)>  connect 'jdbc:derby:wombat;upgrade=true';
ij(CONNECTION2)> values syscs_util.syscs_get_database_property( 
'DataDictionaryVersion' ) ;
1

--------------------------------------------------------------------------------------------------------------
--------
10.5


1 row selected
ij(CONNECTION2)>



Mime
View raw message