Unix Technical Forum

Grant as grantor option

This is a discussion on Grant as grantor option within the Informix forums, part of the Database Server Software category; --> Considering the following piece of code: revoke all on testTable from public; create role hrrole; grant insert on testtable ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 05:29 PM
Krishna
 
Posts: n/a
Default Grant as grantor option

Considering the following piece of code:

revoke all on testTable from public;
create role hrrole;
grant insert on testtable to hrrole;
grant select on testtable to hrrole;

I would like the hruser to grant and revoke some of the privileges
that hrrole provides based on certain business conditions and to do
that I believe the 'AS grantor' option can be used. What is the syntax
error ("201: A syntax error has occured") in the statement below?

grant hrrole to hruser with grant option as hruser;

The above statements are being executed as informix. What's the basic
point am missing here?

Any help would be great! Thanks in advance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 05:29 PM
Fernando Nunes
 
Posts: n/a
Default Re: Grant as grantor option

Krishna wrote:
> Considering the following piece of code:
>
> revoke all on testTable from public;
> create role hrrole;
> grant insert on testtable to hrrole;
> grant select on testtable to hrrole;
>
> I would like the hruser to grant and revoke some of the privileges
> that hrrole provides based on certain business conditions and to do
> that I believe the 'AS grantor' option can be used. What is the syntax
> error ("201: A syntax error has occured") in the statement below?
>
> grant hrrole to hruser with grant option as hruser;
>
> The above statements are being executed as informix. What's the basic
> point am missing here?
>
> Any help would be great! Thanks in advance.
>


I may be overlooking some detail, but "AS hruser" cannot be right...
This clause can be used by a DBA to grant a privilege as if it was granted by
the specified user..
So, you can't be granting a role to user hruser, as if it was granted by the
same user..
Nevertheless, the error messages doesn't seem correct. It's not a syntax error,
but an incongruence... something that can't be done...

"with grant option" will allow hruser to grant this role to others...
It seems this should be enough for your purposes...(?)

Hope this helps. If it's not enough or you find something wrong, I'll test it
(I didn't )

Regards.

--
Fernando Nunes
Portugal

http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com