ua下存在表t1,t2
ub下存在视图v1
需要给uc授权v1视图的访问权限。首先,
grant select on t1 to ub;
grant select on t2 to ub;
事实上,如果只是让ub用户可以访问t1,t2就可以了的话,这里就打住了。 然而由于ub用户建立的view还要供uc使用,在授权的时候就要注意,必须这么写:
grant select on t1   to ub   with grant option;    
grant select on t2   to ub   with grant option;    
这样,ub才有授权v1给uc的能力。
如果不按上面的注意事项操作,则会在ub授权视图的时候,报错:
ORA-01720 grant option does not exist for 'string.string'
Cause: A grant was being performed on a view and the grant option was not present for an underlying object.
Action: Obtain the grant option on all underlying objects of the view.
最后,ub将v1的读取权限授权给uc。
grant select on v1 to uc;
以上方法在Oracle是可行的,但在SQL Server中uc是没有访问t1,t2的权限,但不想直接
grant select on t1 to uc;
grant select on t2 to uc;请问还有什么办法?谢谢!