[Spacewalk-list] Upgrading to 1.2

Michael Mraka michael.mraka at redhat.com
Mon Jan 10 11:04:30 UTC 2011


John Hodrien wrote:
% >% > > % 210-rhnPackage-indexes.sql
% >% > > % 221-rhn_sat_node_probe-indexes.sql
% >% > > % 223-web_contact-indexes.sql
% >% > > % 237-rhnErrataFileChannelTmp-indexes.sql
...
% I applied these interactively using sqlplus:
% 
% #1:
% 
%  SQL> alter table RHNPACKAGECHANGELOG disable constraint
%  RHN_PKG_CHANGELOG_PID_FK
%  *
%  ERROR at line 1:
%  ORA-00942: table or view does not exist
% 
%  SQL> SQL> alter table rhnpackage disable constraint RHN_PACKAGE_ID_PK
%  *
%  ERROR at line 1:
%  ORA-02297: cannot disable constraint (SPACEWALK.RHN_PACKAGE_ID_PK) -
%  dependencies exist
% 
%  SQL> drop index rhn_package_id_nid_paid_idx
%            *
%  ERROR at line 1:
%  ORA-01418: specified index does not exist
% 
% 
%  SQL> drop index rhn_package_path_idx
%            *
%  ERROR at line 1:
%  ORA-02429: cannot drop index used for enforcement of unique/primary key
% 
%  SQL> alter table RHNPACKAGECHANGELOG enable novalidate constraint RHN_PKG_CHANGELOG_PID_FK
%  *
%  ERROR at line 1:
%  ORA-00942: table or view does not exist

Oh I see, RHNPACKAGECHANGELOG has been replaced by  during 1.1 -> 1.2 upgrade.

% #2: All good
%
% #3:
% 
% SQL> alter table RHNSAVEDSEARCH enable novalidate constraint RHN_SAVEDSEARCH_WCID_FK
% *
% ERROR at line 1:
% ORA-00942: table or view does not exist
% 
% SQL> alter table RHNGRAILCOMPONENTCHOICES enable novalidate constraint RHN_GRAIL_COMP_CH_USER_FK
% *
% ERROR at line 1:
% ORA-00942: table or view does not exist
% 
% SQL> alter table RHNEMAILADDRESSLOG enable novalidate constraint RHN_EADDRESSLOG_UID_FK
% *
% ERROR at line 1:
% ORA-00942: table or view does not exist

Similar issue to #1: RHNSAVEDSEARCH, RHNGRAILCOMPONENTCHOICES and
RHNEMAILADDRESSLOG have been dropped during 1.1 -> 1.2 upgrade.
Anyway, web_contact_id_oid_cust_luc index has been dropped successfully.

% #4:
% 
% ERROR at line 3:
% ORA-02216: tablespace name expected

[[64k_tbs]] is replaced with real tablespace name during standard
upgrade. However it should already exit in your schema (from upgrade
time) and the index was dropped successfully so nothing to worry about
here.


Attached script for #1 should finally fix your partialy upgraded schema.

Thanks & regards,

--
Michael Mráka
Satellite Engineering, Red Hat

-------------- next part --------------
alter table RHNCHANNELNEWESTPACKAGE disable constraint RHN_CNP_PID_FK;
alter table RHNCHANNELPACKAGE disable constraint RHN_CP_PID_FK;
alter table RHNERRATAFILEPACKAGE disable constraint RHN_EFILEP_PID_FK;
alter table RHNERRATAFILEPACKAGETMP disable constraint RHN_EFILEPTMP_PID_FK;
alter table RHNERRATAPACKAGE disable constraint RHN_ERR_PKG_PID_FK;
alter table RHNERRATAPACKAGETMP disable constraint RHN_ERR_PKGTMP_PID_FK;
--alter table RHNPACKAGECHANGELOG disable constraint RHN_PKG_CHANGELOG_PID_FK;
alter table RHNPACKAGECHANGELOGREC disable constraint RHN_PKG_CLR_PID_FK;
alter table RHNPACKAGECONFLICTS disable constraint RHN_PKG_CONFLICTS_PACKAGE_FK;
alter table RHNPACKAGEFILE disable constraint RHN_PACKAGE_FILE_PID_FK;
alter table RHNPACKAGEKEYASSOCIATION disable constraint RHN_PKEYA_PID_FK;
alter table RHNPACKAGEOBSOLETES disable constraint RHN_PKG_OBSOLETES_PACKAGE_FK;
alter table RHNPACKAGEPROVIDES disable constraint RHN_PKG_PROVIDES_PACKAGE_FK;
alter table RHNPACKAGEREPODATA disable constraint RHN_PKEY_RD_PID_FK;
alter table RHNPACKAGEREQUIRES disable constraint RHN_PKG_REQUIRES_PACKAGE_FK;
alter table RHNSERVERNEEDEDCACHE disable constraint RHN_SNCP_PID_FK;
alter table RHNSOLARISPACKAGE disable constraint RHN_SOLARIS_PKG_PID_FK;
alter table RHNSOLARISPATCH disable constraint RHN_SOLARIS_P_FK;
alter table RHNSOLARISPATCHSET disable constraint RHN_SOLARIS_PS_PID_FK;
alter table RHNSOLARISPATCHEDPACKAGE disable constraint RHN_SOLARIS_PATCHEDP_PID_FK;
alter table RHNSOLARISPATCHPACKAGES disable constraint RHN_SOLARIS_PP_FK;
alter table RHNSOLARISPATCHSETMEMBERS disable constraint RHN_SOLARIS_PSM_PID_FK;
alter table RHNSOLARISPATCHSETMEMBERS disable constraint RHN_SOLARIS_PSM_PSID_FK;

alter table rhnpackage disable constraint RHN_PACKAGE_ID_PK;
--drop index rhn_package_id_nid_paid_idx;
drop index rhn_package_path_idx;
alter table rhnpackage enable novalidate constraint RHN_PACKAGE_ID_PK;

alter table RHNCHANNELNEWESTPACKAGE enable novalidate constraint RHN_CNP_PID_FK;
alter table RHNCHANNELPACKAGE enable novalidate constraint RHN_CP_PID_FK;
alter table RHNERRATAFILEPACKAGE enable novalidate constraint RHN_EFILEP_PID_FK;
alter table RHNERRATAFILEPACKAGETMP enable novalidate constraint RHN_EFILEPTMP_PID_FK;
alter table RHNERRATAPACKAGE enable novalidate constraint RHN_ERR_PKG_PID_FK;
alter table RHNERRATAPACKAGETMP enable novalidate constraint RHN_ERR_PKGTMP_PID_FK;
--alter table RHNPACKAGECHANGELOG enable novalidate constraint RHN_PKG_CHANGELOG_PID_FK;
alter table RHNPACKAGECHANGELOGREC enable novalidate constraint RHN_PKG_CLR_PID_FK;
alter table RHNPACKAGECONFLICTS enable novalidate constraint RHN_PKG_CONFLICTS_PACKAGE_FK;
alter table RHNPACKAGEFILE enable novalidate constraint RHN_PACKAGE_FILE_PID_FK;
alter table RHNPACKAGEKEYASSOCIATION enable novalidate constraint RHN_PKEYA_PID_FK;
alter table RHNPACKAGEOBSOLETES enable novalidate constraint RHN_PKG_OBSOLETES_PACKAGE_FK;
alter table RHNPACKAGEPROVIDES enable novalidate constraint RHN_PKG_PROVIDES_PACKAGE_FK;
alter table RHNPACKAGEREPODATA enable novalidate constraint RHN_PKEY_RD_PID_FK;
alter table RHNPACKAGEREQUIRES enable novalidate constraint RHN_PKG_REQUIRES_PACKAGE_FK;
alter table RHNSERVERNEEDEDCACHE enable novalidate constraint RHN_SNCP_PID_FK;
alter table RHNSOLARISPACKAGE enable novalidate constraint RHN_SOLARIS_PKG_PID_FK;
alter table RHNSOLARISPATCH enable novalidate constraint RHN_SOLARIS_P_FK;
alter table RHNSOLARISPATCHSET enable novalidate constraint RHN_SOLARIS_PS_PID_FK;
alter table RHNSOLARISPATCHEDPACKAGE enable novalidate constraint RHN_SOLARIS_PATCHEDP_PID_FK;
alter table RHNSOLARISPATCHPACKAGES enable novalidate constraint RHN_SOLARIS_PP_FK;
alter table RHNSOLARISPATCHSETMEMBERS enable novalidate constraint RHN_SOLARIS_PSM_PID_FK;
alter table RHNSOLARISPATCHSETMEMBERS enable novalidate constraint RHN_SOLARIS_PSM_PSID_FK;


More information about the Spacewalk-list mailing list