oracle建立表空間指令碼

2021-06-27 20:49:57 字數 700 閱讀 2716

前言:

以前都是用oracle的工具生成表空間的,今天看到一種更方便、快速的方法---使用資料庫指令碼。

/*分為四步 */

/*第1步:建立臨時表空間 */

create temporary tablespace airforce34

tempfile 'd:\date\airforce34.dbf'

size 100m autoextend on ;

--刪除臨時表空間:

drop tablespace airforce34 including contents and datafiles;

/*第2步:建立資料表空間 */

create tablespace airforce34

datafile 'd:\date\airforce34.dbf'

size 100m autoextend on ;

/*第3步:建立使用者並指定表空間 */

create user airforce34 identified by airforce34

default tablespace airforce34 ;

/*第4步:給使用者授予許可權 */

grant connect,resource,dba to airforce34;

oracle建立表空間和使用者指令碼

利用管理員 不是normal,先建立表空間,再建立使用者,並將新建表空間的操作許可權給使用者 建立表空間 size 100m autoextend on next 10m maxsize unlimited logging extent management local segment space ...

ORACLE模式及表空間建立指令碼

注意 以下操作需要在oracle的dba使用者下進行,否則可能會出現問題 檢視現有表空間資訊 select tablespace name,file id,file name,round bytes 1024 1024 0 total space from dba data files order ...

Oracle建立表空間

建立表空間 create tablespace estate db datafile e estate db.ora size 10m autoextend on 建立臨時表空間 create temporary tablespace estate temp db tempfile e estate...