[Spacewalk-list] Database Schema Update Issue - 1.2 to 1.3 Upgrade

Speagle, Andy andy.speagle at wichita.edu
Wed Apr 13 20:50:29 UTC 2011


> > I'm having an issue with the upgrade from v1.2 to v1.3 ... when I run
> > the spacewalk-schema-upgrade script... it just simply returns:
> >
> > No existing schema version info found in rhnVersionInfo.
> >
> > I can make a simple connection via sqlplus.. so I know the database is
> > running and available.  Looking at the schema upgrade script... I find
> > the query that it runs to check the schema version:
> >
> > select rhnPackageName.name || '-' || (PE.evr).version || '-' ||
> > (PE.evr).release from rhnVersionInfo, rhnPackageName, rhnPackageEVR PE
> >         where rhnVersionInfo.label = 'schema'
> >         and rhnVersionInfo.name_id = rhnPackageName.id
> >         and rhnVersionInfo.evr_id = PE.id;
> >
> > And when I run that manually via sqlplus .. I get no rows returned.
> >
> > Has anyone seen this issue?
> 
> Yes. It means your previous schema upgrade (to Spacewalk 1.2) failed.
> Check log files in /var/log/spacewalk/schema-upgrade for reasons why.

Right... so, this is something that came up in an earlier thread I think.  During my 1.2 upgrade I had this issue with the schema:

SQL> set echo on
SQL> spool /var/log/spacewalk/schema-upgrade/20101129-165813-to-spacewalk-schema-1.2.log append
SQL> whenever sqlerror exit sql.sqlcode
SQL> select 'spacewalk-schema-1.1-to-spacewalk-schema-1.2/210-rhnPackage-indexes.sql' from dual;

'SPACEWALK-SCHEMA-1.1-TO-SPACEWALK-SCHEMA-1.2/210-RHNPACKAGE-INDEXES.SQ
-----------------------------------------------------------------------
spacewalk-schema-1.1-to-spacewalk-schema-1.2/210-rhnPackage-indexes.sql

SQL>
SQL> drop index rhn_package_id_nid_paid_idx;
drop index rhn_package_id_nid_paid_idx
           *
ERROR at line 1:
ORA-02429: cannot drop index used for enforcement of unique/primary key

However, there was a post that talked about this.. and how to fix it.  Did the fix fail to add something in the database to mark it as "successfully upgraded?"

Andy




More information about the Spacewalk-list mailing list