RE: Grant select privileg on a single column to a new user
"Becker, Holger" <[email protected]> Thu, 4 Sep 2003 12:16:00 +0200
| Newsgroups | gmane.comp.db.sapdb.general |
|---|---|
| Message-ID | <[email protected]> |
Andreas Grund wrote:
> i´ve got a little problem with the grant-statement. I work
> with sapdb 7.4.3.25 under WinNT. I´ve create a table like:
> CREATE TABLE "ROOT"."1_4_Calls_KNL"
> (
> "Tag" Timestamp,
> "KC_ID" Integer,
> "Hotline_ID" Integer,
> "Belegung" Float (16),
> "Calls" Float (16),
> "Calls_E20" Float (16),
> "Fore" Float (16),
> FOREIGN KEY "Hotline" ("Hotline_ID") REFERENCES
> "ROOT"."0_6_Hotline" ("ID") ON DELETE RESTRICT
> )
>
> After that i create a new databaseuser with:
> create user "HANS" password "KLAUS" DBA
>
> and a new role:
> create role "ROLLE"
>
> Now i tried to grant the select-privileg on the "Calls_E20"
> column to the role:
> grant select on "1_4_Calls_KNL"."Calls_E20" to "ROLLE"
>
> but i get the error unknown user name. This is clear, because
> the user "1_4_Calls_KNL" doesn´t exist. But if this statement
> isn´t correct, what do i have to do if i want to grant the
> privileg? In the sapdb library stands:"Allows the identified
> user to select rows in the specified table. If column names
> are specified, the rows may only be selected in the columns
> identified by these names. The current user must be
> authorized to grant the SELECT privilege.", so it´s possible,
> but how?? I´m connected to the database as sysdba.
Try it with
grant select ("Calls_E20") on "1_4_Calls_KNL" to "ROLLE"
For mor information have a look here
http://www.sapdb.org/7.4/htmhelp/48/f0dac7225811d3a97d00a0c9449261/frameset.htm
Best regards,
Holger
SAP Labs Berlin