I am having issues when editing an sde feature class from certain users. The way my database is set up is that the authentication roles are updating constantly by comparing the current authentication roles with an LDAP server.

Everything seems to be working fine except for people with user names beginning with a number. I get an error that says "unable to create logfile system tables. User perhaps lacks permissions or resources to create tables [ERROR: syntax error at or near "6" Line 1: CREATE TABLE 6zn.sde_logfiles (logfile_name VARCHAR....)

If the syntax read CREATE TABLE "6zn".sde_logfiles... it would work just fine. Seems like a simple (but scary) solution would be to edit sde functions/triggers/etc. to add quotes for arguments that start with a number in the CREATE TABLE but I have no idea where to start...

Unfortunately, there is no way to get around user names that don't start with numbers.

  • Valid SQL identifiers start with an alpha (a-z) and then contain alphanumeric or underscore. This isn't a question so much as a statement -- there really is no way around user names that start with numbers. – Vince Aug 20 '15 at 17:24
  • You can use identifiers that do not comply by using double quotes as a delimiter. i.e. I was able to make the user 6zn with the statement CREATE ROLE "6zn" LOGIN. The same can be done with tables but the sde functionality is passing the statement CREATE TABLE 6zn.sde_logfiles when it needs to be passing CREATE TABLE "6zn",sde_logfiles. – M. Whitehead Aug 20 '15 at 17:49
  • Esri does not use quotes (which aren't valid in all database implementations), so there is no work-around. – Vince Aug 20 '15 at 18:15
  • So the only thing preventing me from a solution is that there is no way of changing ESRI's logic to pass "6zn" instead of 6zn. ESRI being ESRI. – M. Whitehead Aug 20 '15 at 18:57
  • Well, nothing besides using non-standard identifiers. – Vince Aug 20 '15 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.