Oracle 表空間基本操作

2021-05-28 12:45:34 字數 629 閱讀 5536

1. 查詢資料庫現在的表空間

select tablespace_name, file_name, sum(bytes)/1024/1024 table_size 

from dba_data_files group by tablespace_name,file_name;

2. 建立表空間

create tablespace data01

datafile '/oracle/oradata/db/data01.dbf' size 500m;  3.

刪除表空間

drop tablespace data01 including contents and datafiles; 

4. 修改表空間大小

alter database datafile '/path/naddate05.dbf' resize 100m 

5.增加資料檔案 

alter tablespace newccs add datafile '/u03/oradata/newccs/newccs04.dbf' size 4896m;

6. 刪除資料檔案

sql>alter database datafile '/path/naddate05.dbf' offline  drop;

Oracle 表空間基本操作

1.查詢資料庫現在的表空間 select tablespace name,file name,sum bytes 1024 1024 table size from dba data files group by tablespace name,file name 2.建立表空間 create ta...

oracle 表空間基本操作

查表空間使用率情況 含臨時表空間 select d.tablespace name name d.status status to char nvl a.bytes 1024 1024,0 99,999,990.90 size m to char nvl a.bytes nvl f.bytes,0 ...

oracle有關表空間的基本操作

建立表空間 create tablespace students managent datafile e oracle product 10.2.0 da913047 data da91304701 students management.dbf size 50m,e oracle product ...