Oracle创建视图view错误ORA-01031: 权限不足

 create or replace view REPORT_CONFIGQUERY_367 AS 
 SELECT * FROM (select PARSING_USER_ID,EXECUTIONS,SORTS,COMMAND_TYPE,
 DISK_READS,sql_text FROM v$sqlarea order BY disk_reads DESC )where ROWNUM<10

 oracle在使用系统视图创建视图时,提示权限不足

解决方法:

1,使用system用户登录,connect as DBA

2,赋予scott用户创建视图的权限:GRANT CREATE VIEW TO SCOTT

3,赋予scott可以查询任何表的权限:GRANT SELECT ANY TEBLE TO SCOTT

4,赋予scott可以查询任何字典的权限:GRANT SELECT ANY DICTIONARY TO SCOTT

你可能感兴趣的:(oracle)