<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Materialized view with FAST refresh on remote table: How to include a SHAPE column? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/materialized-view-with-fast-refresh-on-remote/m-p/1009024#M29108</link>
    <description>&lt;DIV class="votecell post-layout--left"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;I want to create an Oracle 18c &lt;A href="https://oracle-base.com/articles/misc/materialized-views" target="_self"&gt;materialized view&lt;/A&gt; with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fast refresh&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option on a &lt;STRONG&gt;remote table&lt;/STRONG&gt; (in an enterprise GDB).&lt;/P&gt;&lt;P&gt;I can do this successfully&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;without&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;a SHAPE column:&lt;/P&gt;&lt;PRE&gt;create materialized view log on source_system.workorder with primary key;
grant select source_system.mlog$_workorder to schema_for_dblink;

create materialized view my_gis_schema.wo_mv
build immediate 
refresh fast
start with sysdate next sysdate + (15/(60*60*24))
as
select
    cast(workorderid as number(38,0)) as objectid, --workorderid is a fake primary key; it has a NOT NULL constraint and a unique index
    wonum,
    status,
    --other fields
    longitudex,
    latitudey
from
    source_system.workorder@my_dblink&lt;/PRE&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to store the XY coordinates from the source table in a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SHAPE&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column in the MV. Unfortunately, my options seem pretty limited:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Oracle doesn’t seem to support SDE.ST_GEOMETRY in MVs (more info&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://support.oracle.com/knowledge/Oracle%20Database%20Products/1067173_1.html" target="_blank" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://support.esri.com/en/technical-article/000009568" target="_blank" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;).&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The SQL would be:&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;sde.st_geometry(longitudex,latitudey,null,null, 26917 ) as shape&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Additionally, Oracle doesn't seem to support SDO_GEOMETRY in MVs on a &lt;STRONG&gt;remote table&lt;/STRONG&gt; with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fast refresh&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option:&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;ORA-12015: cannot create a fast refresh materialized view from a complex query&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The SQL would be:&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;sdo_geometry(2001, 26917, sdo_point_type(longitudex,latitudey, null), null, null) as shape&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a way to include a SHAPE column in a materialized view on a &lt;STRONG&gt;remote table&lt;/STRONG&gt; with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fast refresh&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 13 Dec 2020 01:53:37 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2020-12-13T01:53:37Z</dc:date>
    <item>
      <title>Materialized view with FAST refresh on remote table: How to include a SHAPE column?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/materialized-view-with-fast-refresh-on-remote/m-p/1009024#M29108</link>
      <description>&lt;DIV class="votecell post-layout--left"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;I want to create an Oracle 18c &lt;A href="https://oracle-base.com/articles/misc/materialized-views" target="_self"&gt;materialized view&lt;/A&gt; with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fast refresh&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option on a &lt;STRONG&gt;remote table&lt;/STRONG&gt; (in an enterprise GDB).&lt;/P&gt;&lt;P&gt;I can do this successfully&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;without&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;a SHAPE column:&lt;/P&gt;&lt;PRE&gt;create materialized view log on source_system.workorder with primary key;
grant select source_system.mlog$_workorder to schema_for_dblink;

create materialized view my_gis_schema.wo_mv
build immediate 
refresh fast
start with sysdate next sysdate + (15/(60*60*24))
as
select
    cast(workorderid as number(38,0)) as objectid, --workorderid is a fake primary key; it has a NOT NULL constraint and a unique index
    wonum,
    status,
    --other fields
    longitudex,
    latitudey
from
    source_system.workorder@my_dblink&lt;/PRE&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to store the XY coordinates from the source table in a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SHAPE&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column in the MV. Unfortunately, my options seem pretty limited:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Oracle doesn’t seem to support SDE.ST_GEOMETRY in MVs (more info&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://support.oracle.com/knowledge/Oracle%20Database%20Products/1067173_1.html" target="_blank" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://support.esri.com/en/technical-article/000009568" target="_blank" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;).&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The SQL would be:&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;sde.st_geometry(longitudex,latitudey,null,null, 26917 ) as shape&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Additionally, Oracle doesn't seem to support SDO_GEOMETRY in MVs on a &lt;STRONG&gt;remote table&lt;/STRONG&gt; with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fast refresh&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option:&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;ORA-12015: cannot create a fast refresh materialized view from a complex query&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The SQL would be:&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;sdo_geometry(2001, 26917, sdo_point_type(longitudex,latitudey, null), null, null) as shape&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a way to include a SHAPE column in a materialized view on a &lt;STRONG&gt;remote table&lt;/STRONG&gt; with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fast refresh&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 13 Dec 2020 01:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/materialized-view-with-fast-refresh-on-remote/m-p/1009024#M29108</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2020-12-13T01:53:37Z</dc:date>
    </item>
  </channel>
</rss>

