oracle中建立表空間和使用者的過程

2021-08-03 02:53:01 字數 1025 閱讀 6299

1.先建表空間 2.建使用者。

步驟一:  刪除user

drop user ×× cascade

說明: 刪除了user,只是刪除了該user下的schema objects,是不會刪除相應的tablespace的。

步驟二: 刪除tablespace

drop tablespace tablespace_name including contents and datafiles;

//建立臨時表空間

create temporary tablespace test_temp

tempfile 'e:/oracle/product/10.2.0/oradata/testserver/test_temp01.dbf'

size 32m

autoextend on

next 32m maxsize 2048m

extent management local;

//建立資料表空間

create tablespace test_data

logging

datafile 'e:\oracle\product\10.2.0\oradata\testserver\test_data01.dbf'

size 32m

autoextend on

next 32m maxsize 2048m

extent management local;

//建立使用者並指定表空間

create user username identified by password

default tablespace test_data

temporary tablespace test_temp;

//給使用者授予許可權

grant connect,resource to username;

//以後以該使用者登入,建立的任何資料庫物件都屬於test_temp 和test_data表空間,這就不用在每建立乙個物件給其指定表空間了。

歡迎各位程式猿、程式媛們批評指正~

oracle中建立表空間和建立使用者

oracle中建立表空間和建立使用者 1,資料庫,表空間,使用者名稱,表資料的關係 乙個資料庫對應多個表空間,乙個表空間對應多個表資料 乙個表空間對應多個使用者,乙個使用者對應多個表 oracle中建立乙個表空間 create tablespace wbc 建立表空間 datafile c wate...

oracle中建立使用者和表空間

表空間 建立表空間 create tablespace sunnycoffee datafile e oracletest sunnycoffee ts.dbf size 10m autoextend on 刪除表空間 drop tablespace sunnycoffee including co...

Oracle建立表空間和使用者

oracle建立表空間和使用者 sql view plain copy 建立表空間和使用者的步驟 使用者 建立 create user 使用者名稱 identified by 密碼 授權 grant create session to 使用者名稱 grant create table to 使用者名...