Tuesday, January 17, 2012

Partition cannot be dropped for XML_DOCUMENTS

Issue 3: (Partition drop)
Partition cannot be dropped if there are some b2b records associated with the table.

Solution:
log into soainfra user and run "exec b2b_disable_constraints" command.
then rerun verify script that was generated, you will be able to see all b2b related tables getting altered
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Issue 5 : cannot drop xml_document table partition
SQL> @/tmp/verify/SOA_P03_2012_RESULT_2
SQL> REM Auto generated by the SOA verify script
SQL> REM Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
SQL> REM DESCRIPTION
SQL> REM This script is generated by the SOA verify sctipts. It is used to drop partitions from the SOA Table.
SQL> REM This script should only be run by DBA who is familiar with the SOA Schema.
SQL> REM
SQL> -- COMPONENT: FABRIC
SQL> -- COMPONENT: BPEL
SQL> ALTER TABLE XML_DOCUMENT drop partition P03_2012 UPDATE GLOBAL INDEXES;
ALTER TABLE XML_DOCUMENT drop partition P03_2012 UPDATE GLOBAL INDEXES
*
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys

Solution:
Reason : XML_DOCUMENT is referred by B2B related tables also and hence the partition cannot be dropped so easily.

solution : Run b2b disable constraints as below then run drop partition command
login as soainfra user and run
$SQL>exec B2B_DISABLE_CONSTRAINTS

to enable B2B constraint after dropping run below command
$SQL> exec B2B_ENABLE_CONSTRAINTS
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
================================================================================
Disclaimer: The views expressed on this blog are solely our own and do not necessarily reflect the views of Oracle.
================================================================================

No comments:

Post a Comment