Kathey,

This sounds exactly like what I'm seeing. I don't get an error message either, though I haven't yet turned up the logging. From your examples here it looks like I could issue a shutdown connection before the upgrade connection to get the database to actually upgrade. So for my scenario does it sound like this would work:

1. startup application
2. use softupgrade connection to determine database schema version
3. user confirms upgrade via UI
4. issue db shutdown connection
5. issue db upgrade connection
6. continue on using the application with the upgraded database

This would all be in one JVM instance, without ever restarting the JVM. Anyone know of a reason this won't work?

Evan



On Jun 2, 2009, at 9:37 AM, Kathey Marsden wrote:

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)>



Reply via email to