Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2006

Tip: Looking for answers? Try searching our database.

numeric userids in db2 udb v8.1.9 linux

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Stearns - 03 Jun 2006 22:32 GMT
Linux accepts the userid '00001', and I can login to my database with
that userid. But when I try to grant privileges to that userid I get:

DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC:
00001;user_animals TO USER;END-OF-STATEMENT
Message: An unexpected token "00001" was found following "user_animals
TO USER".  Expected tokens may include:  "END-OF-STATEMENT".

The grant statement is:

GRANT SELECT ON TABLE is3.user_animals TO USER 00001

The example in the SQL Reference  Vol 2 is:

GRANT SELECT, INSERT ON CALENDAR TO USER PHIL, USER CLAIRE

TABLE is optional, I include for clarity. I an trying to grant only
SELECT to only USER 00001, so I think my general syntax is OK. My
question is:
Does db2 disallow purely numeric userids?
m - 04 Jun 2006 03:32 GMT
> Linux accepts the userid '00001', and I can login to my database with
> that userid. But when I try to grant privileges to that userid I get:
[quoted text clipped - 16 lines]
> question is:
> Does db2 disallow purely numeric userids?

From the Administration Guide - Implementation:

General naming rules

7 Rules exist for the naming of all objects and *** users***. 7 Some of
these rules are specific to the platform you are working on. 7 For
example, there is a rule regarding the use of upper and lower case
letters in a name.

    * On UNIX(R) platforms, names must be in lower case.
    * On Windows(R) platforms, names can be in upper, lower, and
mixed-case.

Unless otherwise specified, all names can include the following characters:

    * A through Z. When used in most names, characters A through Z are
converted from lowercase to uppercase.
    * 0 through 9.
    * 7 ! % ( ) { } . - ^ ~ _ (underscore) 7 @, #, $, and space.
    * 7 \ (backslash).
---------------------------------------------------------------------
Names cannot begin with a number or with the underscore character.
---------------------------------------------------------------------

*** This means the userids that db2 likes CANNOT begin with a number......

Do not use SQL reserved words to name tables, views, columns, indexes,
or authorization IDs.

7 There are other special characters that might work separately
depending 7 on your operating system and where you are working with
DB2(R) Universal Database (DB2 UDB). 7 However, while they might work,
there is no guarantee that they will work. 7 It is not recommended that
you use these other special characters when naming objects in your database.

You also need to consider object naming rules, workstation naming rules,
naming rules in an NLS environment, and naming rules in a Unicode
environment.
Related concepts
Bob Stearns - 04 Jun 2006 06:19 GMT
>> Linux accepts the userid '00001', and I can login to my database with
>> that userid. But when I try to grant privileges to that userid I get:
[quoted text clipped - 57 lines]
> environment.
> Related concepts
Thank you, I thought that might be the case, but the message is
certainly not clear.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.