--新建表空间 CoreBank
create tablespace CoreBank
logging
datafile 'd:/oracle/product/10.2.0/oradata/orcl/CoreBank.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
--删除表空间
drop tablespace CoreBank including contents and datafiles
--创建临时表空间
CREATE TEMPORARY TABLESPACE test_temp
TEMPFILE 'D:/oracle/product/10.2.0/oradata/orcl/test_temp01.dbf'
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
--创建用户并分配表空间
create user _name identified by _password
default tablespace CoreBank
temporary tablespace test_temp;
--授权
grant resource to _name
--查看数据库中所有表空间
select * from dba_tablespaces
本文介绍如何在Oracle数据库中创建、删除表空间及临时表空间,并演示了如何创建用户并分配默认表空间和临时表空间。此外,还提供了查看数据库中所有表空间的SQL命令。

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



