NOTE: steps below are for sde 10.8.1, adjustments may be needed for other versions.
Realizing this is an old post, but for those migrating database servers without doing full export/import of db... this can be caused by importing sde schema objects in incorrect sequence, and also lack of st_spatial_index object. In Oracle I did the following to repair it:
1: run this command on your working SDE instance to get the statement to recreate the ST_SPATIALINDEX type on the broken instance:
SELECT DBMS_METADATA.GET_DDL('INDEXTYPE', 'ST_SPATIAL_INDEX', 'SDE') FROM DUAL;
Run the SQL output it gives you on the broken instance to remake the ST_SPATIAL_INDEX type.
2: In my case I also had to fix the following: regrant all sde schema grants to public, some were missing. I used the following script to export the commands to dbms_output to regrant them all:
SET SERVEROUTPUT ON SIZE UNLIMITED; BEGIN FOR r IN ( SELECT owner, table_name, privilege FROM dba_tab_privs WHERE grantee = 'PUBLIC' AND grantor = 'SDE' ) LOOP DBMS_OUTPUT.PUT_LINE('GRANT ' || r.privilege || ' ON ' || r.owner || '.' || r.table_name || ' TO PUBLIC;'); END LOOP; END; /
3: Then I also had to copy the gdb_items table over because it had issues importing originally:
This was best done using sql insert statements because of the CLOB and ST_GEOMETRY datatype columns involved. Use this to generate them:
select 'insert into sde.gdb_items(OBJECTID, UUID, TYPE, NAME, PHYSICALNAME, PATH, URL, PROPERTIES, DEFAULTS, DATASETSUBTYPE1, DATASETSUBTYPE2, DATASETINFO1, DATASETINFO2, CONTINGENTVALUES, DEFINITION, DOCUMENTATION, ITEMINFO, SHAPE) values(''' || OBJECTID || ''',''' || UUID || ''',''' || TYPE || ''',''' || NAME || ''',''' || PHYSICALNAME || ''',''' || PATH || ''',''' || URL || ''',''' || PROPERTIES || ''',' || case when DEFAULTS is null then 'NULL' else ''''||to_char(DEFAULTS) || '''' end ||',''' || DATASETSUBTYPE1 || ''',''' || DATASETSUBTYPE2 || ''',''' || DATASETINFO1 || ''',''' || DATASETINFO2 || ''',' || case when CONTINGENTVALUES is null then 'NULL' else ''''||to_char(CONTINGENTVALUES) || '''' end || ',''' || DEFINITION || ''',''' || DOCUMENTATION || ''',''' || ITEMINFO || ''',' || case when shape is null then 'NULL);' else ' sde.st_geomfromtext(''' || to_char(sde.st_astext(shape)) || '''));' end from sde.gdb_items;
After doing those things, I compared rows counts between the old and new sde schemas and they matched again, so that seems to have resolved the issues. I can now connect again and create feature classes. You may not need to complete all of these steps as your symptoms may vary.
ESRI Support ended up directing us to reimage our 32-bit PCs to 64-bit. Whether or not that was the actual issue is still debated, but the reimaging fixed their connection issues.
Facing exact same error when trying to connect to Oracle geodatabase from ArcCatalog. Error window includes "Failed to connect to the specified server. Do you want to continue?" along with the error posted.
If this issue got resolved please post how this got resolved.
Did anyone figure it out?
Hi, Leonardo:
How did you solve this problem finally? I know it's a long time, but we are facing the exact the same error when connecting the gdb while restore it from another instance.
It would be great if you can post the methods how you resolve this problem.
Thank you very much.
3 FUNCTION 101 INDEX 1 INDEXTYPE 2 LIBRARY 20 LOB 69 OPERATOR 33 PACKAGE 33 PACKAGE BODY 1 PROCEDURE 23 SEQUENCE 62 TABLE 12 TRIGGER 41 TYPE 26 TYPE BODY 5 VIEW
SQL> select count(object_type),object_type 2 from user_objects group by object_type 3 order by object_type; COUNT(OBJECT_TYPE) OBJECT_TYPE ------------------ ------------------- 3 FUNCTION 103 INDEX 1 INDEXTYPE 1 LIBRARY 20 LOB 69 OPERATOR 33 PACKAGE 33 PACKAGE BODY 23 SEQUENCE 62 TABLE 12 TRIGGER 32 TYPE 24 TYPE BODY 5 VIEW
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.