Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Usernames with a dot

141 views
Skip to first unread message

Troels Arvin

unread,
Sep 2, 2011, 8:10:25 AM9/2/11
to
Hello,

We have a user with username foo.bar (note the dot).

The user can connect to DB2, but we cannot grant rights to the user:

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it returned:
SQL0567N The operation failed because the specified authorization name
does
not meet the identifier naming rules. Authorization name: "foo.bar".
SQLSTATE=42602

It doesn't even work if double-quotes are used in the GRANT statement:
GRANT select ON some.table TO USER "foo.bar"

What to do?

--
Troels

Yonghang Wang

unread,
Sep 2, 2011, 8:17:47 AM9/2/11
to
which platform?

Troels Arvin

unread,
Sep 2, 2011, 9:04:00 AM9/2/11
to
Hello,

Yonghang Wang wrote:
> which platform?

Linux.

I found a way to GRANT: If I use upper-case, it works:
GRANT select ON some.table TO USER "FOO.BAR"

--
Troels

Troels Arvin

unread,
Sep 2, 2011, 9:05:39 AM9/2/11
to
I wrote:
> I found a way to GRANT: If I use upper-case, it works: GRANT select ON
> some.table TO USER "FOO.BAR"

- And if the user then connects as "foo.bar", then things still work (it
looks like DB2 normalizes usernames to upper case).

But I'm afraid that there might be further complications ahead. Could
there be other special situations when using usernames with dots?

--
Troels

Will Honea

unread,
Sep 2, 2011, 1:47:28 PM9/2/11
to
Troels Arvin wrote:

You get similar problems in a more common case of the apostrophe in a name
like O'Neil. For most cases, escaping the apostrophe works (O''Neil) but
that syntax doesn't work with the host system - just in DB2 statements.

--
WHonea

--- Posted via news://freenews.netfront.net/ - Complaints to ne...@netfront.net ---

0 new messages