My Oracle Support Banner

12c Import Virtual Column Defination Changes ORA-01442 (Doc ID 1983171.1)

Last updated on MARCH 27, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

NOTE: The document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

While Importing in 12c database Virtual Column Attributes change.

E.g.

At Source:

SQL> desc PT_PARTICIPATIONS_NF


Name                                      Null?    Type
----------------------------------------- -------- ----------------------------
ID                                        NOT NULL NUMBER(10)
PART_CONTRACT_NO                                   NVARCHAR2(15)
PART_PAYOFF_AMT                                    NUMBER(13,2)
LESSOR                                    NOT NULL NVARCHAR2(3)                     --- Virtual Column  NOT NULL NVARCHAR2(3)

 

After Import At Target:

SQL> desc oracle_sr.PT_PARTICIPATIONS_NF


Name                                      Null?    Type
----------------------------------------- -------- ----------------------------
ID                                        NOT NULL NUMBER(10)
PART_CONTRACT_NO                                   NVARCHAR2(15)
PART_PAYOFF_AMT                                    NUMBER(13,2)
LESSOR                                    NOT NULL NUMBER                            ------- Virtual Column NOT NULL NUMBER       

In Import Log Errors like ORA-01442 reported for Virtual Columns.

ALTER TABLE "ORACLE_SR"."PT_PARTICIPATIONS_NF" MODIFY ("LESSOR" NVARCHAR2(3) GENERATED ALWAYS AS (SUBSTR("PART_CONTRACT_NO",1,3)) VIRTUAL NOT NULL ENABLE)
ORA-39083: Object type TABLE:"ORACLE_SR"."TB_TAX_NF" failed to create with error:
ORA-01442: column to be modified to NOT NULL is already NOT NULL
Failing sql is:


Changes

 none

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.