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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| ||||
| 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... |