表空间
Jun 07, 2016 pm 04:06 PM1.查看某个用户对应的表空间和datafile select t1.username,t2.tablespace_name,t2.file_name,t1.temporary_tablespace ,t3.file_name from dba_users t1 left join dba_data_files t2 on t1.default_tablespace = t2.tablespace_name left join dba_temp_fi
1.查看某个用户对应的表空间和datafile
select t1.username,t2.tablespace_name,t2.file_name,t1.temporary_tablespace ,t3.file_name
from dba_users t1
left join
dba_data_files t2
on t1.default_tablespace = t2.tablespace_name
left join
dba_temp_files t3
on t1.temporary_tablespace = t3.tablespace_name
where
lower(t1.username) in
('lbi_sys_ptcl','lbi_ods_ptcl','lbi_ods_ptcl','lbi_edm_ptcl','lbi_ls_ptcl','lbi_dm_ptcl','lbi_dim_ptcl')
2.产看表空间信息:
(1)一般表空间查询
select * from dba_data_files t where t.tablespace_name in (
'TBS_DIM_PTCL','TBS_LS_PTCL', 'TBS_ODS_PTCL', 'TBS_DM_PTCL', 'TBS_EDM_PTCL', 'TBS_SYS_PTCL' );
(2)临时表空间查询
select * from dba_temp_files t where t.tablespace_name in ('TBS_TEMP_PTCL');
3.创建表空间
(1)一般表空间
create tablespace "TBS_DW_YM"
nologging
datafile '/opt/oracle/oradata/YM_tbs/TBS_DW_YM.dbf' size 50m
extent management local segment space management auto;
--extent management:区管理
--local segment space management :本地段空间管理
--auto 自动管理,一般默认情况就是,如果想改为手动管理:manual
(2)临时表空间
create
temporary tablespace "TBS_YM_TEMP"
tempfile '/opt/oracle/oradata/YM_tbs/TBS_YM_TEMP.dbf' size 50m
reuse autoextend on next 640k maxsize 1000M;
--reuse :重新运用,可以加可以不加

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to use Xiaohongshu account to find users? Can I find my mobile phone number?

Check out the steps to delete a logged-in device on Douyin

How to check your own ID on Xianyu_Introduction to how to check your personal nickname on Xianyu

Analysis of user password storage mechanism in Linux system

Where to check music rankings on NetEase Cloud Music_How to check music rankings on NetEase Cloud Music

How to view the hot list of Kuaishou Live Companion videos

How to check how many groups you have joined on WeChat: a simple step
