<?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 Feature Access service: 00166: Layer's ObjectID is not maintained by the database in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688293#M26338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using 10.2 Arcmap/ArcGIS Server on Windows with PostgreSQL 9.2/PostGIS 2.0. I'm try to publish a Feature Access service with all the Operations and Capabilities enabled against a purely PostGIS table (not using Esri's ST_GEOMETRY type). However, when publishing I get this blocking error during the ArcMap validation part. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"00166: Layer's ObjectID is not maintained by the database and the feature service is being published with Create capability enabled" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the database creation script, which clearly has an auto-incrementing primary key (and editing the data outside of ArcMap proves the database is managing the ObjectID values)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
CREATE SEQUENCE test_schema.mypoint_const_b_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
 START 1
CACHE 1;
 ALTER TABLE test_schema.mypoint_const_b_seq
 OWNER TO postgres;

CREATE TABLE test_schema.mypoint_const_b
(
&amp;nbsp; objectid integer NOT NULL DEFAULT nextval('test_schema.mypoint_const_b_seq'::regclass),
&amp;nbsp; volmon24_i integer,
&amp;nbsp; site_id integer,
&amp;nbsp; waterbody character varying(30),
&amp;nbsp; CONSTRAINT mypoint_const_b_pkey PRIMARY KEY (objectid)
)
WITH (
&amp;nbsp; OIDS=FALSE
);

SELECT AddGeometryColumn ('test_schema','mypoint_const_b','geom',4326,'MULTIPOINT',2,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; false);

ALTER TABLE test_schema.mypoint_const_b
&amp;nbsp; OWNER TO postgres;

CREATE INDEX mypoint_const_b_geom_gist
&amp;nbsp; ON test_schema.mypoint_const_b
&amp;nbsp; USING gist
&amp;nbsp; (geom);

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What are the rules for creating PostGIS tables that ArcGIS Server 10.2 can use for publishing a Feature Access service with the Create function enabled?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jan 2014 18:44:50 GMT</pubDate>
    <dc:creator>JohnZastrow</dc:creator>
    <dc:date>2014-01-02T18:44:50Z</dc:date>
    <item>
      <title>Feature Access service: 00166: Layer's ObjectID is not maintained by the database</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688293#M26338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using 10.2 Arcmap/ArcGIS Server on Windows with PostgreSQL 9.2/PostGIS 2.0. I'm try to publish a Feature Access service with all the Operations and Capabilities enabled against a purely PostGIS table (not using Esri's ST_GEOMETRY type). However, when publishing I get this blocking error during the ArcMap validation part. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"00166: Layer's ObjectID is not maintained by the database and the feature service is being published with Create capability enabled" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the database creation script, which clearly has an auto-incrementing primary key (and editing the data outside of ArcMap proves the database is managing the ObjectID values)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
CREATE SEQUENCE test_schema.mypoint_const_b_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
 START 1
CACHE 1;
 ALTER TABLE test_schema.mypoint_const_b_seq
 OWNER TO postgres;

CREATE TABLE test_schema.mypoint_const_b
(
&amp;nbsp; objectid integer NOT NULL DEFAULT nextval('test_schema.mypoint_const_b_seq'::regclass),
&amp;nbsp; volmon24_i integer,
&amp;nbsp; site_id integer,
&amp;nbsp; waterbody character varying(30),
&amp;nbsp; CONSTRAINT mypoint_const_b_pkey PRIMARY KEY (objectid)
)
WITH (
&amp;nbsp; OIDS=FALSE
);

SELECT AddGeometryColumn ('test_schema','mypoint_const_b','geom',4326,'MULTIPOINT',2,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; false);

ALTER TABLE test_schema.mypoint_const_b
&amp;nbsp; OWNER TO postgres;

CREATE INDEX mypoint_const_b_geom_gist
&amp;nbsp; ON test_schema.mypoint_const_b
&amp;nbsp; USING gist
&amp;nbsp; (geom);

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What are the rules for creating PostGIS tables that ArcGIS Server 10.2 can use for publishing a Feature Access service with the Create function enabled?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 18:44:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688293#M26338</guid>
      <dc:creator>JohnZastrow</dc:creator>
      <dc:date>2014-01-02T18:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Access service: 00166: Layer's ObjectID is not maintained by the database</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688294#M26339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take a look at this web-link. It might help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00sq000000t7000000"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//00sq000000t7000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 19:39:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688294#M26339</guid>
      <dc:creator>NidhinKarthikeyan</dc:creator>
      <dc:date>2014-01-02T19:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Access service: 00166: Layer's ObjectID is not maintained by the database</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688295#M26340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Piggybacking off of what Nidhin said, try to use the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000184000000"&gt;Add Incrementing ID Field&lt;/A&gt;&lt;SPAN&gt; tool within the Toolbox.&amp;nbsp; This ensures the ObjectID created is consistent with whatever ArcMap/ArcGIS Server requires for that field, in terms of the triggers and sequences.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 22:06:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688295#M26340</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2014-01-02T22:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Access service: 00166: Layer's ObjectID is not maintained by the database</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688296#M26341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. I had already seen that link, but in re-reading it I see that it answers one of my questions posted earlier (&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/98624-Data-type-for-auto-incrementing-OBJECTID-in-Postgres"&gt;http://forums.arcgis.com/threads/98624-Data-type-for-auto-incrementing-OBJECTID-in-Postgres&lt;/A&gt;&lt;SPAN&gt; ) which is that Esri does support the Serial data type shortcut for creating incrementing IDs in postgres. I've been running everything as the postgres user so permissions shouldn't be an issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I'm still stumped as to why I'm getting this error (and perhaps relatedly why the tool in this link also fails to work and errors without offering a useful message). I've tried many permutations on the table defs, and I even tried calling the incrementing PK something other than "objectid" and running these tools. I also tried calling it "OBJECTID" only to later read that all caps won't work for Esri.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 23:19:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/feature-access-service-00166-layer-s-objectid-is/m-p/688296#M26341</guid>
      <dc:creator>JohnZastrow</dc:creator>
      <dc:date>2014-01-02T23:19:53Z</dc:date>
    </item>
  </channel>
</rss>

