问题:
增加系统TS_COMM 表
1. oracle 如何增加表空间
baidu个例子:
alter tablespace SPACE_name add datafile 'DIR/dafile.dbf' size 100Mautoextend on maxsize 2G
红色内容是我需要替换的,SPACE_name 就是TS_COMM ,我需要找数据文件路径和命名规则
1. 找数据文件:
select tablespace_name, file_id, file_name,
round(bytes/(1024*1024),0) total_space
from dba_data_files
where tablespace_name = 'TS_COMM'
order by tablespace_name
TS_COMM 83 /dev/rMNCN_02G_10 2040 YES
DIR 应该就是:/dev/rMNCN_02G_10, 文件的命名规则也能看到
2. 找大小
那数字怎么替换,怎么选择!
ls -tlr /dev/rMNCN_02G_10
oracle dba 50,122 May 18 02:54 /dev/rMNCN_02G_10
所以最终的语句:
alter tablespace TS_COMM add datafile 'DIR/dafile.dbf' size 50Mautoextend on maxsize 2G