Oracle表空間操作,oracle表空間
-- 查看表空間
SELECT tablespace_name,
file_id,
file_name,
round(bytes / (1024 * 1024), 0)||'M' total_space
FROM dba_data_files
ORDER BY tablespace_name;
-- 創建表空間
create tablespace test
logging
datafile '/data2/js/test_01.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
-- 新增表空間的數據文件
ALTER TABLESPACE test
ADD
DATAFILE
'/data2/js/test_02.dbf' SIZE 1024M
AUTOEXTEND ON NEXT 256M MAXSIZE 32767M;
-- 刪除表空間
drop tablespace WISDATA including contents and datafiles;