--创建临时表空间
drop tablespace test_tablespace_temp
create temporary tablespace test_tablespace_temp
tempfile 'D:\test_tablespace_temp.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
--创建表空间
drop tablespace test_tablespace
create tablespace test_tablespace
logging
datafile 'D:\test_tablespace.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
--创建用户并指定表空间
create user username_01 identified by password_01
default tablespace test_tablespace
temporary tablespace test_tablespace_temp;
--给用户授予权限
grant connect,resource to username_01;
--以后以该用户登录,创建的任何数据库对象都属于test_tablespace_temp 和test_tablespace表空间,这就不用在每创建一个对象给其指定表空间了。
oracle创建表空间,创建用户笔记
最新推荐文章于 2025-05-16 08:53:09 发布