oralce建立表空間和建立使用者

2021-06-16 16:11:40 字數 845 閱讀 5458

1、登陸資料庫

sqlplus sys/password@orcl as sysdba;

2、建立資料庫資料表空間,例如建立資料tbl_ar表空間。

create tablespace "tbl_ar"

logging

datafile

extent management local

segment space management auto;

3、建立資料庫索引表空間,例如 建立索引tbl_indexes表空間。

create tablespace "tbl_indexes"

logging

datafile

extent management local

segment space management auto;

其中,administrator為使用者名稱,orcl是例項名,請根據實際情況修改,確保資料檔案的存放路徑已經存在。

4、建立資料庫使用者。例如:建立ar使用者,密碼為ar

create user ar identified by ar

default tablespace tbl_ar

temporary tablespace temp

profile default;

--grant/revoke role privileges

grant connect to ar;

grant dba to ar;

--grant/revoke system privileges

grant create any table to ar;

grant unlimited tablespace to ar;

oralce 的表空間的建立

建立表空間 create smallfile tablespace 表空間名 datafile d oracle product 10.2.0 oradata oracle安裝路徑 表空間名 size 500m reuse autoextend on next 512k maxsize unlimi...

Toad for Oracle 建立表空間和使用者

表空間 1.找到tablespace,右鍵,單擊create tablespace 2.輸入表空間名字,例如 test tablespace 3.單擊 date files 選項卡,單擊add 4.在 datafile name 文字框中輸入 dbf的檔名,例如 d test test.dbf 5....

oralce表空間建立修改刪除

乙個資料庫可以有多個表空間,乙個表空間裡可以有多個表。表空間就是存多個表的物理空間 可以指定表空間的大小位置等。建立表空間 create tablespace ts1 datafile c tablespace ts1.dbf size 50m 自動擴充套件大小 create tablespace ...