User commentString

Database
Enthusiast

User commentString

On creating users not all users have been given a standard comment. As we use staff numbers for logging on its hard to tell who this person is (quickly)

I have wrote a script to search ldap for all the users in the database but can not find a way to update this field (modify user doesn't show the option looking in the manuals). COMMEN ON USER|database also does not work.

Any ideas on how to modify this?

select databasename,commentstring from dbc.databases where databasename = 'username'

If the field I am talking about.
4 REPLIES
Enthusiast

Re: User commentString

COMMENT ON USER username AS 'anythingyoulike';
Enthusiast

Re: User commentString

I tried that, again, and get a 3707:

3707: Syntax error, expected something like a name or a Unicode delimited identifier between the 'USER' keyword and the string '0'.
Output directed to Answerset window

The SQL I have tried:

COMMENT ON USER '1234567' AS 'This is a test comment';
COMMENT ON USER 1234567 AS 'This is a test comment';

Any ideas?

Scratch that just tried as follows:

COMMENT ON USER "1234567" AS 'This is a test comment';

Damn quotes :-)
Enthusiast

Re: User commentString

Does anyone know how to amend the CommentString for databases such as DBC/ALL/DEFAULT?

When trying COMMENT ON USER DBC AS '<CommentString>'; it fails with COMMENT Failed. 3524:  The user does not have DROP USER access to database DBC. 

DBC cannot have DROP USER access to itself obviously: 

GRANT Failed. 3524:  The user does not have DROP USER WITH GRANT OPTION access to database DBC. 

-- Jonny
Teradata Employee

Re: User commentString

Ok the question I have is why you would want or need to change the comment string for DBC? 

-Fred