Due to reasons beyond the scope of this question, I'm forced to import data into an SQL Server SDE database using SQL statements (importing using ArcGIS is not possible). The data already contains ObjectID values that I need to keep.
My idea was to create empty featureclasses first, then import the data, and finally execute
sde.next_rowid several times to increase the ObjectID value for objects that will be inserted later. For example, if the data already has ID's 10–20, I need to execute
sde.next_rowid 20 times, so that a new record will get ID 21.
Importing the data works, and executing
sde.next_rowid too, or at least it seems so: I can see that the values for fields base_id and last_id in the i<reg_id> table are increased. However, if I insert data using ArcMap or ArcGIS Pro, new ObjectIDs still start counting at 1.
- The GeoDatabase is version 10.8
- SQL Server is version 2019
(Restarting ArcMap or Pro does not fix this)