能访问的表,却抱
ORA-00942[@more@]
今天写了个function:
create or replace function show_pkg (name in varchar2) return varchar2
is
v_code varchar(1000);
cursor c_code is
select a.text from sys.dba_source a
where a.owner='MAS9I' and a.name=upper(name) and a.type='PACKAGE BODY';
begin
open c_code;
loop
fetch c_code into v_code;
exit when c_code%notfound;
dbms_output.put_line(v_code);
end loop;
end;
编译的时候抱错:ORA-00942: table or view does not exist ,可是用该用户是可以访问 DBA_SOURCE的,为啥写到function会抱错呢
翻查了资料才知道 要赋select any dictionary 的权限,可是为什么会这样,还是搞不懂
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/133835/viewspace-1005651/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/133835/viewspace-1005651/