Oracle建立使用者與授予表空間與許可權

2021-09-24 15:15:07 字數 1706 閱讀 2680

oracle建立使用者     

建立:create user 使用者名稱 identified by "密碼";
oracle 表空間

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

建立表空間的定義

建立表空間(一般建n個存資料的表空間和乙個索引空間):

create tablespace 表空間名

datafile ' 路徑(要先建好路徑)\***.dbf ' size *m

tempfile ' 路徑\***.dbf ' size *m

autoextend on --自動增長

--還有一些定義大小的命令,看需要

default storage(

initial 100k,

next 100k,

);

例子

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

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

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

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

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

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

授予使用者使用表空間的權利

alter user 使用者名稱 quota unlimited on 表空間;

或 alter user 使用者名稱 quota *m on 表空間

授予使用者的基本許可權

授權:

grant create session to 使用者名稱;

grant create table to 使用者名稱;

grant create tablespace to 使用者名稱;

grant create view to 使用者名稱;

grant connect,resource to demo;

grant create any sequence to demo;

grant create any table to demo;

grant delete any table to demo;

grant insert any table to demo;

grant select any table to demo;

grant unlimited tablespace to demo;

grant execute any procedure to demo;

grant update any table to demo;

grant create any view to demo;

Oracle建立使用者與授予表空間與許可權

oracle建立使用者 建立 create user 使用者名稱 identified by 密碼 oracle 表空間 乙個資料庫可以有多個表空間,乙個表空間裡可以有多個表。表空間就是存多個表的物理空間 可以指定表空間的大小位置等。建立表空間的定義 建立表空間 一般建n個存資料的表空間和乙個索引空...

oracle建立表空間並授予使用者許可權

注意 每條語語分開執行,結尾必須用分號 建立空間 create tablespace test datafile c oracle oradata orcl9 test.dbf size 50m default storage initial 500k next 500k minextents 1 ...

授予oracle匯入使用者表許可權

給使用者增加匯入資料許可權的操作 第一,啟動sql puls 第二,以system manager登陸 第三,create user 使用者名稱 identified by 密碼 如果已經建立過使用者,這步可以省略 第四,grant create user,drop user,alter user ...