Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / October 2007

Tip: Looking for answers? Try searching our database.

Grant as grantor option

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Krishna - 31 Oct 2007 00:24 GMT
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.
Fernando Nunes - 31 Oct 2007 00:51 GMT
> Considering the following piece of code:
>
[quoted text clipped - 14 lines]
>
> 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.

Signature

Fernando Nunes
Portugal

http://informix-technology.blogspot.com
My email works... but I don't check it frequently...

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.