---
title: "oralce扩展表空间"
author: "kennethf6986"
date: "2012-04-18T22:31:45Z"
tags: []
categories: ["数据库"]
slug: "oralce"
draft: false
lastmod: "2012-04-18T22:31:45Z"
id: 1489907
url: "https://kennethf6986.iteye.com/blog/1489907"
---

col TABLESPACE\_NAME format a30  
set pagesize 9999  
col GB format 99999.999  
select TABLESPACE\_NAME,sum(bytes)/1024/1024/1024 GB from dba\_data\_files group by  TABLESPACE\_NAME order by TABLESPACE\_NAME;  
!date  
select TABLESPACE\_NAME,sum(bytes)/1024/1024/1024 GB from dba\_free\_space group by  TABLESPACE\_NAME order by TABLESPACE\_NAME;  
   
alter tablespace TBS\_DATA\_SIG\_ETL\_RPT add datafile '/opt/oracle/oradata/tbs\_data\_sig\_etl\_rpt/tbs\_data\_sig\_etl\_rpt\_16g\_02' size 16G autoextend off;

alter tablespace TBS\_DATA\_SIG\_USER\_RPT1 add datafile '/opt/oracle/oradata/tbs\_data\_sig\_user\_rpt1/tbs\_data\_sig\_user\_rpt1\_02.dbf' size 2G autoextend off;  
alter tablespace TBS\_DATA\_SIG\_USER\_RPT2 add datafile '/opt/oracle/oradata/tbs\_data\_sig\_user\_rpt1/tbs\_data\_sig\_user\_rpt2\_02.dbf' size 2G autoextend off;  
alter tablespace TBS\_DATA\_SIG\_USER\_RPT3 add datafile '/opt/oracle/oradata/tbs\_data\_sig\_user\_rpt1/tbs\_data\_sig\_user\_rpt3\_02.dbf' size 2G autoextend off;  
alter tablespace TBS\_DATA\_SIG\_USER\_RPT4 add datafile '/opt/oracle/oradata/tbs\_data\_sig\_user\_rpt1/tbs\_data\_sig\_user\_rpt4\_02.dbf' size 2G autoextend off;  
alter tablespace TBS\_DATA\_SIG\_USER\_RPT5 add datafile '/opt/oracle/oradata/tbs\_data\_sig\_user\_rpt1/tbs\_data\_sig\_user\_rpt5\_02.dbf' size 2G autoextend off;  
su - oracle  
sqlplus / as sysdba  
alter tablespace TBS\_DATA\_SIG\_ETL\_RPT add datafile '/opt/oracle/oradata/tbs\_data\_sig\_etl\_rpt/tbs\_data\_sig\_etl\_rpt\_8g\_03' size 8G autoextend off;