create temporary tablespace anne_temp
tempfile 'E:\oracle\product\10.2.0\oradata\hwy\anne_dev.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
//创建数据表空间
create tablespace anne_temp
logging
datafile 'E:\oracle\product\10.2.0\oradata\hwy\anne_dev.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
//创建用户并指定表空间
create user username identified by password
default tablespace anne_temp
temporary tablespace anne_temp;
//给用户授予权限
grant connect,resource to username;
//以后以该用户登录,创建的任何数据库对象都属于test_temp 和test_data表空间,这就不用在每创建一个对象给其指定表空间了。
解决ORA-01031: 权限不足的方法如下:
grant connect,resource,dba to
username;
赋权DBA之后,如果还有这个错误。
执行
grant all privileges TO username
赋予任何主机访问数据的权限,问题得到了解决。
本文详细介绍了在Oracle数据库中创建临时表空间、数据表空间的过程,以及如何创建用户并指定默认表空间和临时表空间。此外,还讲解了如何通过grant语句为用户授予权限,包括connect、resource和dba权限,以解决ORA-01031权限不足的问题。
486

被折叠的 条评论
为什么被折叠?



