ORACLE資料庫管理 pdb使用者 許可權管理

2021-10-08 13:56:25 字數 1516 閱讀 2227

1、common users普通使用者(使用者名稱以c##或c##開頭)僅建立在cdb層;建立在pdb層會報錯ora-65094: invalid local user or role name

create user c##test identified by test container=all;

grant create session to c##test;

grant create session to c##test container=all;

-- pdb普通使用者

create user test identified by 1;

grant connect,resource to test;

alter user test default tablespace users;

grant unlimited tablespace to test;

-- cdb公共使用者

create user c##rede identified by 1;

grant connect,resource to c##rede;

alter user c##rede default tablespace deftbs;

grant unlimited tablespace to c##rede;

2、local users本地使用者僅建立在pdb層,建立的時候必須指定container;建立在cdb層會報錯ora-65096: invalid common user or role name

3、cdb建立的c##使用者可以在pdb檢視到,即cdb中建立公用使用者預設情況下是在所有pdb下建立了相同的使用者

4、使用者許可權在cdb和pdb中是隔離的,也就是說在cdb中的許可權不會同步到pdb除非在cdb中授權時加上container=all,則在cdb中授權的許可權會同步到pdb,在pdb中授權後許可權也不會同步到cdb,在pdb中授權不能加container=all,否則會報錯ora-65040: operation not allowed from within a pluggable database

5、cdb建立的c##使用者可以在pdb登入,但是有兩個前提,一是要在pdb中單獨授權,二是要加上pdb對應的tns。不加tns預設連線的是cdb

6、cdb刪除c##使用者時,就算pdb中該使用者的許可權和cdb不一樣,該使用者也自動在pdb中也刪除了,pdb無法直接刪除c##使用者,會報錯ora-65040: operation not allowed from within a pluggable database

7、pdb中已經有c##test1使用者時,pdb還可以建立test1

8、sys和system使用者是普通使用者,是全域性的,所以直接在pdb中conn sys、system使用者時不加pdb的tns,預設連線到cdb;sys、system的密碼只能在cdb修改且新密碼會自動在pdb生效,pdb修改sys、system密碼會報錯

檢查Oracle資料庫和PDB資料庫的大小

檢查oracle資料庫和pdb資料庫的大小 non cdb資料庫的以下查詢 檢查磁碟上資料庫消耗的物理消耗量。select sum bytes 1024 1024 size in mb from dba data files 檢查資料使用的總空間。select sum bytes 1024 1024...

oracle資料庫管理

當乙個oracle 例項建立了之後,會自動建立 system 和sys使用者 區別 對於兩者之間的區別,就類似 sys 使用者是董事長,system 使用者是總經理 具體的區別如下 儲存的資料的重要性不同 sys 所有的oracle 的資料字典的基表和動態檢視都存放在 sys使用者中,這些基表和檢視...

Oracle 資料庫使用者管理

oracle 許可權設定 一 許可權分類 系統許可權 系統規定使用者使用資料庫的許可權。系統許可權是對使用者而言 實體許可權 某種許可權使用者對其它使用者的表或檢視的訪問許可權。是針對表或檢視而言的 二 系統許可權管理 1 系統許可權分類 dba 擁有全部特權,是系統最高許可權,只有dba才可以建立...