Andreas Grund wrote:

> 
> Hu Mailinglist,
> 
> 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"

The syntax for granting select-privileg on columns can be seen:
http://www.sapdb.org/7.4/htmhelp/48/f0dac7225811d3a97d00a0c9449261/frameset.htm
and
http://www.sapdb.org/7.4/htmhelp/a4/2938b7248811d3a97d00a0c9449261/frameset.htm
and
http://www.sapdb.org/7.4/htmhelp/32/302d68249411d3a97d00a0c9449261/frameset.htm

and looks as follows:
<grant_statement> ::=
   GRANT <priv_spec>,... TO <grantee>,... [WITH GRANT OPTION]
 | GRANT EXECUTE ON <dbproc_name> TO <grantee>,...
 | GRANT SELECT ON <sequence_name> TO <grantee>,... [WITH GRANT OPTION]

<priv_spec> ::= 
  ALL [PRIV[ILEGES]] ON [TABLE] <table_name>,...
 | <privilege>,... ON [TABLE] <table_name>,... | <role_name>

<privilege> ::=
  INSERT 
 | UPDATE [(<column_name>,...)] 
 | SELECT [(<column_name>,...)] 
 | SELUPD [(<column_name>,...)] 
 | DELETE 
 | INDEX
 | ALTER
 | REFERENCES [(<column_name>,...)]

==>
GRANT SELECT ("Calls_E20") ON "1_4_Calls_KNL" TO "ROLLE"

will be a good idea.

Elke
SAP Labs Berlin


> 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.
> 
> Greeting and thanks in advance,
> Andreas
> ________________________________________________________________
> Mit der Grupppen-SMS von WEB.DE FreeMail k�nnen Sie eine SMS an alle 
> Freunde gleichzeitig schicken: 
http://freemail.web.de/features/?mc=021179


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to