ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Ora-01950的错误

Ora-01950的错误

原创 Linux操作系统 作者:天下流云 时间:2010-07-26 20:11:04 0 删除 编辑

建用户分配权限的时候出错了。解决办法如下。

==================================================================================

SQL> create user test identified by test default tablespace test temporary table
space temp;

用户已创建。

SQL> show user
USER 为 "SYS"
SQL> grant create table to test;

授权成功。

SQL> grant alter any table,delete any table,select any table to test;

授权成功。
==================================================================================
C:\>sqlplus test/test@local

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 7月 26 20:59:03 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options


SQL> select * from user_tablespaces;

未选定行

SQL> create table TT(P_NAME varchar2(5),I_NAME varchar2(5),CNT int);
create table TT(P_NAME varchar2(5),I_NAME varchar2(5),CNT int)
*
第 1 行出现错误:
ORA-01950: 对表空间 'TEST' 无权限
SQL>
==================================================================================

解决方法如下:

==================================================================================
sys用户
SQL> grant resource,connect to test;

授权成功。

SQL>
==================================================================================
test用户
SQL> create table TT(P_NAME varchar2(5),I_NAME varchar2(5),CNT int);

表已创建。

SQL>
==================================================================================
原来必须要有resource权限呢,为什么呢。。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24221699/viewspace-669544/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 关于小数的TO_CHAR
请登录后发表评论 登录
全部评论

注册时间:2010-07-10

  • 博文量
    3
  • 访问量
    4922