2

I have made connection to a postgresql database in ArcGIS Catalog from Database connections . pgAdmin shows the database owner is 'postgres' so i have made the connection with user 'postgres'.

I want to further register a table in this database to Geodatabase (to add OID field) which i am not able to do. When I right-click the table and go to Manage, everything is greyed out and not available.

When i use GP tool 'Register with Geodatabase' it gives error - ERROR 001050 Either registered with geodatabase already or cannot open the dataset.

Documents on ArcGIS resource say - 'Be sure you connect as the owner of the table.'

What does it mean here ? Does it refer to the owner of the database in postgresql or .. ?

3
  • Be careful that you keep the terms "login", "user", and "schema" as distinct as possible in your own mind. ArcGIS expects that login == user == schema (only the table owner can register a table). It is a violation of best practice to do anything as the postgres user. Please don't try to load or manage spatial data while logged in as postgres (it's a really fast way to trash your database without even trying).
    – Vince
    Commented Nov 21, 2017 at 18:14
  • Thank you for your useful guidelines. The problem indeed was related. I had imported osm data using osm2pgsql and by default it was imported in the "public" schema of the database in postgresql. In order to register these tables with geodatabase (with user "sde") i had to change schema of tables in postgresql from "public" to "sde" and owner from "postgres" to "sde".
    – Jio
    Commented Dec 6, 2017 at 11:56
  • No, it is a violation of best practice to set the sde user as the owner of any data. You need to create a data management login and create data with that.
    – Vince
    Commented Dec 6, 2017 at 13:17

1 Answer 1

3

As per your questions related to What does it mean here ? Does it refer to the owner of the database in postgresql or .. ?

Based on Can't Register table with Geodatabase - Arc 10.1, SQL 2008

You will need to connect as the Data Owner (not the database owner) and perform those operations.

Using ESRI, Fundamentals of ObjectID fields

The ObjectID field is maintained by ArcGIS and guarantees a unique ID for each row in a table. When you look at a table or a layer's attribute table, you will usually see the ObjectID field listed under the aliases of OID or ObjectID. Key functions, such as scrolling and displaying selection sets, depend on the presence of this field.

The following data sources, however, do not contain an ObjectID field with their tabular data:

  • OLE DB data
  • Delimited text file data
  • Microsoft Excel data
  • Nonspatial data from SDE 3 (Note: Spatial data has an ObjectID field.)
  • Unregistered nonspatial data from ArcSDE (Note: Unregistered spatial data has an ObjectID field.)
  • Unregistered data from a personal geodatabase

If your table lacks an ObjectID field, you won't be able to perform the following operations:

  • Select the features in the layer on the map. Although you can select records in the Table window, including selecting using an expression on Select By Attributes, this selection set is not reflected on the map.
  • Apply a definition query to display only a subset of records or features.
  • Create relates. You can relate to a table without an ObjectID field from a table with an ObjectID field, however. In this case, the relate can be used by the Identify tool to list related records. You can't push selections via the relate.
  • Start an edit session and edit the attributes. However, you can edit the table the layer is based on directly on disk, such as in a text editor if the file is a .txt file. Your changes will then be reflected on the map the next time you refresh the map.

There are several ways of obtaining an ObjectID field for your data:

  • If you are working with a table of x,y coordinates and displaying them in ArcMap, you can export the x,y layer to a new feature class. You can also convert a table of coordinates into a new point feature class in ArcCatalog. Both of these procedures create a fully functional feature class with an ObjectID.
  • You can use the Make Query Table tool, which allows you to make the table using an OLE DB connection and to specify a column to use for the ObjectID or dynamically add the ObjectID.
    With some data sources, you can register data with ArcGIS, which adds an ObjectID field.

For reference Warning: Data source does not have an OID field

As a general reference, I would refer to this error information: 001050: Either registered with geodatabase already or cannot open the dataset

Check the data properties of the data you attempted to register to make sure it isn't already registered with the geodatabase. Also, check to make sure it is a supported data type that can be registered to the geodatabase. Only tables that meet the geodatabase's preregistration requirements can be registered to the geodatabase.

2
  • thank you for your detailed answer . i have already read through all of it on ArcGIS resource but my question is not answered because i dont want to only query the table but also perform spatial and network analysis with it. . What is not clear yet are the last two lines in my question.
    – Jio
    Commented Nov 21, 2017 at 15:41
  • I've just updated the answer once more, it appears you would need to register as owner of the data owner
    – whyzar
    Commented Nov 21, 2017 at 16:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.