RE: Doubt related to partition by reference

  • From: "Reen, Elizabeth " <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "elizabeth.reen" for DMARC)
  • To: "'william@xxxxxxxxxxxxxxxxxxxx'" <william@xxxxxxxxxxxxxxxxxxxx>, ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 26 Feb 2018 16:46:44 +0000

However that would make the clean up a lot easier.  Assuming that orphan 
invoice details should not be hanging around.

Liz



From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On ;
Behalf Of William Robertson
Sent: Saturday, February 24, 2018 4:21 AM
To: ORACLE-L
Subject: Re: Doubt related to partition by reference

How do you want to partition those invoice details that aren’t associated with 
any invoice? The whole idea of reference partitioning is that partitioning 
cascades from the parent to the child, so there can’t be orphans.

Can you create a dummy invoice 0 and make that the default when the parent 
invoice is unknown? These would all go in one partition though, so if there are 
a huge number of them it might defeat the partitioning strategy.

William

On 23 Feb 2018, at 01:50, Eriovaldo Andrietta 
<ecandrietta@xxxxxxxxx<mailto:ecandrietta@xxxxxxxxx>> wrote:

Hello,

I am using oracle 12.2 version.
I have a partitioned table INVOICE by range that has a column ID as primary key.
I have other table INVOICE_DETAIL that has a column  FK_INVCE_ID NUMBER(20,0)  
that is a reference to 
INVOICE.ID<https://urldefense.proofpoint.com/v2/url?u=http-3A__INVOICE.ID&d=DwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=yWMFosURAngbt8VLeJtKLVJGefQxustAZ9UxecV7xpc&m=-UF5OEPxD1pXohyxjXYN7uOlN_TBrFRPbqHQs9pCZMo&s=GmCuxQqJdWStbcQY2QxXVmqso2gqimoMNu3VNYVc6-0&e=>

I tried to create a partition by reference and got this error.

ORA-14651: reference partitioning constraint is not supported

I cannot change the INVOICE_DETAIL. FK_INVCE_ID to NOT NULL, it must allow NULL.

Is there another way to create the partition by reference for INVOICE_DETAIL 
when the column FK_INVOICE_ID is filled ?

Regards
Eriovaldo

Other related posts: