Invalid object name 'sde.SDE_table_registry'
rbovard opened this issue · 5 comments
Hi @thbuchmann,
I encounter an issue while running SetSpatialIndexesGeometryMSSQL
script:
Invalid object name 'sde.SDE_table_registry'
The full trace:
(u'42S02', u"[42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'sde.SDE_table_registry'.")
Failed script SetSpatialIndexesGeometryMSSQL...
Traceback (most recent call last):
File "GeocomDatabaseManagementTools\py\gc_egdb_set_spidx_geom_mssql.py", line 249, in <module>
main(*argv)
File "GeocomDatabaseManagementTools\py\gc_egdb_set_spidx_geom_mssql.py", line 180, in main
table = select(sql,instance,database,dbms_admin,dbms_admin_pwd)
File "GeocomDatabaseManagementTools\py\gc_egdb_set_spidx_geom_mssql.py", line 63, in select
return cursor.fetchone()
File "GeocomDatabaseManagementTools\py\pypyodbc.py", line 1914, in fetchone
check_success(self, ret)
File "GeocomDatabaseManagementTools\py\pypyodbc.py", line 986, in check_success
ctrl_err(SQL_HANDLE_STMT, ODBC_obj.stmt_h, ret, ODBC_obj.ansi)
File "GeocomDatabaseManagementTools\py\pypyodbc.py", line 964, in ctrl_err
raise Error(state,err_text)
Error: (u'HY010', u'[HY010] [Microsoft][Gestionnaire de pilotes ODBC] Erreur de s\xe9quence de la fonction')
The database is SQL Server 2017.
Hi @rbovard,
as you can find under Known issues:
Geocom Database Management Tools do not support Esri Workgroup license.
But you can adapt /py/gc_sql_utils.py - Lin 137 to:
FROM dbo.SDE_table_registry
Best,
@thbuchmann
Hi @thbuchmann,
Thanks a lot for your quick workaround, it worked well!
I didn't think about this limitation, since I didn't have a problem with the old script for indexes and it worked well with the same license level.
Best regards.
PS: You can close this issue or not if it's relevant to keep it opened.
Hi @rbovard,
no problem - I think your old script was already adapted ;-)
I'll close the issue.
If you have further problems, please let us know.
Best,
@thbuchmann
Oh, I just checked it and the schema was not defined:
getTableId = """
SELECT registration_id,imv_view_name
FROM SDE_table_registry
WHERE table_name = '{tablename}'
"""
Is there any reason why you added it?
You're right! for Workgroup there's not always the need to define the "dbo"-scheme because it's the "default"-scheme if you're working with sa-permissions.