查看用户表空间

表空间数据字典

dba_tablespaces  系统管理员

user_tablespaces  普通用户

Tablespace_name:

 SYSTEM

 SYSAUX

 UNDOTBS1

 TEMP

 USERS

 EXAMPLE

 

dba_users  系统管理员

user_users  普通用户

查看用户的默认/临时表空间

select default_tablespace,temporary_tablespace from dba_users where username = 'SYSTEM';

设置用户的默认/临时表空间

ALTER USER username

DEFAULT | TEMPORARY

TABLESPACE tablespace_name

 

创建表空间

1、永久表空间  CREATE TABLESPACE tablespace_name DATAFILE 'xxx.dbf' SIZE xxx;

create tablespace test1_tablespace datafile 'test1file.dbf' size 10m

2、临时表空间  CREATE TEMPORARY TABLESPACE tablespace_name TEMPFILE  'xxx.dbf' SIZE xxx;

create temporary tablespace temptest1_tablespace tempfile 'tempfile1.dbf' size 10m

 

查看表空间路径

永久表空间  select file_name from dba_data_files where tablespace_name = 'TEST1_TABLESPACE';

临时表空间  select file_name from dba_temp_files where tablespace_name = 'TEMPTEST1_TABLESPACE';

 

posted on 2018-03-17 16:29  哈喽2018  阅读(544)  评论(0)    收藏  举报