oralce表空間建立修改刪除

2021-07-14 10:22:41 字數 563 閱讀 1023

乙個資料庫可以有多個表空間,乙個表空間裡可以有多個表。表空間就是存多個表的物理空間; 可以指定表空間的大小位置等。

建立表空間:create tablespace ts1 datafile'c:\tablespace\ts1.dbf' size 50m; 

自動擴充套件大小:create tablespace ts2 datafile'c:\tablespace\ts2.dbf' size50m autoextend on next 10m; 

設定最大空間:create tablespace ts3 datafile'c:\tablespace\ts3.dbf' size 50m autoextend on next 10m maxsize 1024m;

更改使用者預設表空間:alter database default tablespacets1; 

表空間改名:altert tablespace ts1 rename to tss1;

刪除表空間:drop tablespace ts2 including contents and datafiles;

注意刪除表空間其實體地址依舊存在,需要手動刪除

建立 修改 刪除ORACLE表空間

建立表空間 create tablespace myfirstspace datafile autoextend on next 5m maxsize unlimited default storage initial 128k next 2m pctincrease 0 sql create ta...

oracle表空間操作(建立 修改 刪除)

建立表空間 create tablespace tp1 datafile d ora tp1.dbf size 50m 為表空間新增資料檔案 alter tablespace tp1 add datafile d ora tp2.dbf size 60m 刪除表空間的資料檔案 alter table...

建立 修改 刪除表

1 建立表 1.1 完整約束條件表 約束條件 說明primary key 表示該屬性為表的主鍵,可以唯一的表示對應的元組 foreign key 標示該屬性為表的外來鍵,是與之聯絡的某錶的主鍵 not null 標示該屬性不能為空 unique 標示該屬性的值是唯一的 auto increment ...