資料庫 之Oracle 操作表空間

2021-09-11 06:12:58 字數 550 閱讀 8817

oracle 把乙個資料庫按照功能劃分成若干個空間儲存資料。在磁碟上每個資料表空間對應乙個檔案。

表空間的建立方式

create tablespace 表空間名字 datafile '檔案路徑和檔名名' size 表空間大小

create tablespace 表空間名字 /home/oracle/data.dbf ' size 500 m

建立使用者並指定表空間

create user 使用者名稱 identified by 使用者登入密碼 default tablespace 表空間;

create user lcluhan identified by lcluhan default tablespace data;

授權給新使用者

grant connect, resource, dba to 使用者名稱;

Oracle資料庫之表空間

表空間 1.表空間的建立 建立表空間的時候需要指定該錶空間的物理檔案 create tablespace user1 datafile d oracle user1 data.dbf size 20m 表空間名字 user1 物理檔案 user1 data.dbf 大小20m 目錄 d oracle...

Oracle資料庫表空間常用操作

1.檢視所有表空間大小 sql select tablespace name,sum bytes 1024 1024 from dba data files group by tablespace name 2.已經使用的表空間大小 sql select tablespace name,sum by...

oracle資料庫管理之表空間

create tablespace spacename 表空間名稱 logging size 32m 初始大小 autoextend on 開啟自動擴充套件 next 32m maxsize 20480m 每次增加32m,最大空間20g extent management local 使用本地管理區...