ORACLE 新建資料庫及許可權賦予

2021-08-30 15:30:14 字數 986 閱讀 4587

新裝的oracle資料庫,預設的表空間是orcl,現在想建立乙個新的庫,在新庫下面建表。

按照如下步驟:

以system超級管理員使用者進入

1、首先,建立(新)使用者: create user username identified by password;

username:新使用者名稱的使用者名稱 password: 新使用者的密碼

也可以不建立新使用者,而仍然用以前的使用者,如:繼續利用scott使用者
2.建立表空間:

create tablespace tablespacename datafile 'd:\data.dbf' size ***m;

tablespacename:表空間的名字

d:\data.dbf':表空間的儲存位置

***表空間的大小,m單位為兆(m)

create tablespace bigdatateam datafile 'd:\oracle\oradata\bigdatateam.dbf' 

size 100m

autoextend on next 32m maxsize 2048m

3.將空間分配給使用者:

alert user username default tablespace tablespacename;

將名字為tablespacename的表空間分配給username

alter user suyd default tablespace bigdatateam
4.給使用者授權:

grant create session,create table,unlimited tablespace to username;

grant create session,create table,unlimited tablespace to suyd
5、接下來,直接切換回原使用者,直接建表就可以了

新建oracle資料庫

2019年2月21日 蘇州 biip的資料庫名為 biiporcl 所用使用者預設的密碼為 root 初始化設定的 使用者為 biipuser 密碼為 root create user biipuser identified by root grant create functions to bii...

oracle資料庫賦權 Oracle資料庫許可權

oracle資料庫許可權基本認識 一 oracle許可權 oracle系統提供三種許可權 object 物件級 system 系統級 role 角色級。許可權分類 1 系統許可權 系統規定使用者使用資料庫的許可權。系統許可權是對使用者而言 2 實體許可權 某種許可權使用者對其它使用者的表或檢視的訪問...

怎樣新建Oracle資料庫

新建oracle資料庫三種方法 1.通過執行oracle database configuration assistant 建立配置或刪除資料庫 也可在命令列下輸入dbca 2.用命令列的方式建立資料庫 3.通過執行自定義的批處理指令碼 或create oracle sid.bat create o...