Home  >  Article  >  Database  >  存储过程中遇到ORA-00942表或视图不存在

存储过程中遇到ORA-00942表或视图不存在

WBOY
WBOYOriginal
2016-06-07 16:43:521521browse

后来查资料得知如果用户有dba角色,角色里包含的权限在存储过程里不会被继承;所以又单独对tb_bil_acct_566 ,seq_bil_acct_his_

解决方法:

grant select, insert, update, delete on bookmarks.* to bm_user@localhost identified by 'password'

授权语句:意思是把表 XXX select, insert, update, delete权限授给bm_user表

以sys身份登录,为system赋予select 和delete sys.fga_log$的权限,,否则下边的存储过程添加会有问题。

Sql> grant select ,delete on sys.fga_log$ to system;

原因:

后来查资料得知如果用户有dba角色,角色里包含的权限在存储过程里不会被继承;所以又单独对tb_bil_acct_566 ,seq_bil_acct_his_hisid_566.nextval等作了显式赋权,问题得以解决。

grant 授权的授权结果从哪里看到?

grant select ,delete on sys.fga_log$ to system;--改的是哪个基表? --dba_tab_privs

select * from dba_tab_privs where grantee='SYSTEM' AND TABLE_NAME='FGA_LOG$'[@more@]grant select ,delete on sys.fga_log$ to system;--改的是哪个基表? --dba_tab_privs

select * from dba_tab_privs where grantee='SYSTEM' AND TABLE_NAME='FGA_LOG$

本文永久更新链接地址:

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn