建用户分配权限的时候出错了。解决办法如下。
==================================================================================
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博客 ” ,链接:http://blog.itpub.net/24221699/viewspace-669544/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24221699/viewspace-669544/