dbTalk Databases Forums  

Usernames with a dot

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Usernames with a dot in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Troels Arvin
 
Posts: n/a

Default Usernames with a dot - 09-02-2011 , 07:10 AM






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

Reply With Quote
  #2  
Old   
Troels Arvin
 
Posts: n/a

Default Re: Usernames with a dot - 09-02-2011 , 08:04 AM






Hello,

Yonghang Wang wrote:
Quote:
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

Reply With Quote
  #3  
Old   
Troels Arvin
 
Posts: n/a

Default Re: Usernames with a dot - 09-02-2011 , 08:05 AM



I wrote:
Quote:
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

Reply With Quote
  #4  
Old   
Will Honea
 
Posts: n/a

Default Re: Usernames with a dot - 09-02-2011 , 12:47 PM



Troels Arvin wrote:

Quote:
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?
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 news (AT) netfront (DOT) net ---

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.