473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

numeric userids in db2 udb v8.1.9 linux

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?
Jun 3 '06 #1
2 1945
m
Bob Stearns wrote:
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?


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
Jun 4 '06 #2
m wrote:
Bob Stearns wrote:
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?

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

Thank you, I thought that might be the case, but the message is
certainly not clear.
Jun 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
1
by: Philippe Grosse | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
7
by: Jive | last post by:
Here's my sitch: I use gnuplot.py at work, platform Win32. I want to upgrade to Python 2.4. Gnuplot.py uses extension module Numeric. Numeric is now "unsupported." The documentation says "If...
4
by: Raziq Shekha | last post by:
Hello All, Does SQL Sever 2000 keep track of all the logins/userids that were deleted over the last year? For example, If I deleted a login "Joe" from a SQL 2000 server, (and of course the...
0
by: Johannes Nix | last post by:
There is a subtle bug in the RandomArray module, which is part of the Numeric package. It causes the random number generator RandomArray.normal() to return incorrect values when invoked on Linux...
5
by: auditory | last post by:
I am a newbie here I am trying to read "space separated floating point data" from file I read about csv module by searching this group, but I couldn't read space separated values with csv....
0
by: Alan | last post by:
Dears, It's about Pyhton for Linux X86. First, I would like to know if it's possible to build a fully static python binary, something that does not depends on others libraries when using 'ldd...
4
by: Serman D. | last post by:
I would like to extract the first 6 digits of a numeric value (e.g. the string '123456' out of the numeric 1234567890123456789). I tried a combination of CAST and SUBSTR, but it seems I am not...
5
by: Benyang | last post by:
Maybe it has been reported somewhere, but it is a big surprise to me. # Try the following: import Numeric a = Numeric.ones(10) a = -1 print a It works correctly on 32-bit linux machines and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.