db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: Can't upgrade from 10.1 to 10.3
Date Tue, 05 Jun 2007 03:14:53 GMT
Dag H. Wanvik wrote:
> Stanley Bradbury <Stan.Bradbury@gmail.com> writes:
>
>   
>> Am I missing something?  Has anyone successfully done the following
>> upgrade?: I am not able to perform a hard upgrade from 10.1 to 10.3
>> [am setting the ...PreReleaseUpgrade=true and using  10.3.0.0 alpha - 
>> (543348)].  When I attempt to hard upgrade a 10.1 DB that requires
>> authentication and has three valid users none of the logons are
>> allowed to upgrade.  The error is:
>> ij version 10.3
>> ij> connect 'jdbc:derby:tstDB;upgrade=true;user=stan;password=xyzzy1';
>> ERROR 08004: User 'STAN' cannot hard upgrade database 'tstDB'. Only
>> the database owner can perform this operation.
>>     
>
> This is because the database was created with an other effective user,
> which then became the database owner. If authentication was not
> enabled at the time of creation and no specific user given, the owner
> would be "APP". The docs changes for DERBY-2264 warm against this
> "gotcha".  A work-around is to make "APP" a valid user, if it is not
> already one.
>
> With the new semantics for 2264 (patch 8) tying the enforcement to SQL
> authorization, users will hopefully know the database owner, so this
> "trap" is less likely.
>
>   
========   SNIP   =======

Making APP a valid user did not work for me either.  Prior to version 
10.2 I am not aware of there being a DBO but I understand the system 
tables were owned by DBA so I created such a user and it appears to have 
worked but since there is no schema called DBA any SQL causes errors.  
Is there anyway for an end-user to tell whom the code expects the DBO to 
be? 

C:\Stan\L3\10.3\DBO>java org.apache.derby.tools.ij
ij version 10.3
ij> connect 'jdbc:derby:noUserDB;upgrade=true;user=DBA;password=DBA';
ij> select columnnumber, columnname from sys.syscolumns where 
referenceid in (select tableid from sys.systables where ta
blename = 'SYSTABLES') order by columnnumber;
ERROR 42Y07: Schema 'DBA' does not exist
ij> set schema app;
0 rows inserted/updated/deleted
ij> select columnnumber, columnname from sys.syscolumns where 
referenceid in (select tableid from sys.systables where tablename = 
'SYSTABLES') order by columnnumber;
COLUMNNUMB&|COLUMNNAME

------------------------------------------------------------------------------------------------------------------------
--------------------
1          |TABLEID

2          |TABLENAME

3          |TABLETYPE

4          |SCHEMAID

5          |LOCKGRANULARITY


5 rows selected
ij> exit;



   %%%  Attempts w/APP   %%%%%%%%%%%
ij version 10.3
ij> connect 'jdbc:derby:tstDB;upgrade=true;user=APP;password=APP';
ERROR 08004: User 'APP' cannot hard upgrade database 'tstDB'. Only the 
database owner can perform this operation.





Mime
View raw message