使用informix用户授权时提示“ 302: No GRANT option or illegal option on multi-table view.”

某用户使用informix去授权时提示“ 302: No GRANT option or illegal option on multi-table view.”
如下所示:

$ dbaccess sinocxdb -

Database selected.

> grant select on t1 to sinotest;

  302: No GRANT option or illegal option on multi-table view.
Error in line 1
Near character position 29
> 

使用dbschema命令查看表,发现表的owner为用户sinocx

$ dbschema -d sinocxdb -t t1 -ss

DBSCHEMA Schema Utility       INFORMIX-SQL Version 12.10.FC8

{ TABLE "sinocx".t1 row size = 4 number of columns = 1 index size = 0 }

create table "sinocx".t1 
  (
    c1 integer
  ) extent size 16 next size 16 lock mode row;

revoke all on "sinocx".t1 from "public" as "sinocx";

使用用户sinocx进行授权,提示成功:

$ dbaccess sinocxdb -

Database selected.

> grant select on t1 to sinotest;

Permission granted.

因此,要注意,需要使用表的拥有者即onwer进行授权,而不是说informix用户可以对所有表进行授权。