My Oracle Support Banner

Wrong Results When Creating Materialized View On Remote View Based on External Table (Doc ID 467642.1)

Last updated on OCTOBER 30, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 10.2.0.3 [Release 10.2]
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

NOTE: In the images and/or 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.

Creating a materialized view based on remote table works fine, but when the materialized view is based on a remote view, data in the mview is wrong.

Varchar2 columns contain nulls, columns which are not empty contain invalid data (source data is unique against a set of columns but the result is not).

Any select statement used in mview definition works correctly (there is some data in varchar2 columns and the data is unique).

Database Versions Involved:

Master : 9.2.0.8 - Mview : 10.2.0.3 : Problem reproduces
Master : 9.2.0.8 - Mview : 9.2.0.8 : Problem reproduces
Master : 10.2.0.3 - Mview : 10.2.0.3 : ORA-1452 creating the Mview
Master : 10.2.0.3 - Mview : 9.2.0.8 : Not tested
Local Mview on 9.2.0.8 : Data correct
Local Mview on 10.2.0.3 : Data correct.

Steps to Reproduce:

CREATE TABLE test1
(M_ROW$$ default '00000000.0000.0000',
S_CODE,
CO_CODE,
CE_CODE,
NAME,
DISPLAY_NAME) AS
SELECT ROWIDTOCHAR(ROWID),
K_*A,
K_*I,
K_G*,
GM***,
GM***||' ('||R**_G****||')' FROM
TEST_G*****_V@dblink1;

Data in table test1 is nulled.

If table is created on 10.2.0.3 based directly on the table on 9.2.0.8 without rowid, the results are correct:

CREATE TABLE test2
(

S_CODE,
CO_CODE,
CE_CODE,
NAME,
DISPLAY_NAME) AS
SELECT K**_*A,
K**_*I,
K**_G*,
N****,
N****||' ('||
DECODE (k*_g****,
'1', 'm*****',
'2', 'w*****',
'3', 'm****-w****') ||')'
FROM xx_****@dblink1
WHERE k**_*i IS NOT NULL AND k**_g* IS NOT NULL AND k**_g*** IS NOT NULL;

If the mview is created directly on the table on 9.2.0.3 the results are correct.


Changes

 

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


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