解决Oracle在scott用户下创建视图(VIEW)权限不足的方法
问题描述:在scott用户下创建视图的时候,报错:权限不足。(其他用户以此类推)
解决方法:
- 以dba用户登录
[sql] view plain copy
print?
- sqlplus / as sysdba
- 赋予scott用户创建VIEW的权限
[sql] view plain copy
print?
- grant create view to scott
- 以scott用户登录oracle
[sql] view plain copy
print?
- conn scott/tiger
- 创建视图成功
[sql] view plain copy
print?
- CREATE OR REPLACE VIEW myview AS
- SELECT * FROM emp where deptno = 20;