Home > Database > Mysql Tutorial > body text

ORACLE soctt 不能创建视图

WBOY
Release: 2016-06-07 15:24:16
Original
1312 people have browsed it

ORACLE 的scott用户创建视图时出错: CREATE OR REPLACE NOFORCE VIEW classes_view AS SELECT * FROM classes; --创建视图语句 第 1 行出现错误: ORA-01031: 权限不足 解决办法: 1、查看当前scott用户权限 select * from session_privs; --结果中是否有cre

ORACLE 的scott用户创建视图时出错:

CREATE OR REPLACE NOFORCE VIEW  classes_view
AS
SELECT * FROM classes;                   --创建视图语句

第 1 行出现错误:
ORA-01031: 权限不足


解决办法:

1、查看当前scott用户权限

select * from session_privs;    --结果中是否有create view权限


2、如没有则使用管理员用户(sys)grant权限

Window键+R打开运行窗口输入:sqlplus / as sysdba

grant create view to scott

授权成功。



                                     

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template