oracle 12c 建立PDB使用者即Local User (PDB與CDB)

來源:互聯網
上載者:User

標籤:xtend   環境   size   name   例子   角色   rac   空間   environ   

Oracle 12C使用者建立與資料表空間分配 
資料庫安裝完成後,首先用系統使用者連結資料庫容器(CDB), 在資料庫容器(CDB)中建立資料表空間‘imei’ SQL>create 
tablespace 
iemi 
datafile‘E:\Oracle_DB\ 
cdb_iemi.dbf‘size 10240m autoextend on next 200m; 資料表空間已建立。 
接下來在Oracle 12C資料庫中建立使用者時會報ORA-65096錯誤。 SQL> create user imei identified by imei default tablespace imei temporary tablespace imei_temp; * 
ERROR at line 1: 
ORA-65096: invalid common user or role name ORA-65096:公用使用者名稱或角色名稱無效 
以前沒見過這個錯誤,通用使用者(common user)是什嗎?之前的版本可是沒這概念啊,上網搜尋看到了下面的圖片,原來和common user對應的還有local user。

 

 

這個common user 和local user是和oracle 12c的新特性pluggable database(PDB)有關。在PDB中建立的使用者就是local user。從可以看出,common user必須以大寫或小寫c##開頭,嘗試建立以c##開頭的common user。 

SQL> create user c##imei identified by imei default tablespace imei temporary tablespace imei_temp;; User created. 
SQL> grant dba to c##imei; Grant succeeded. 
每個PDB都是獨立的單元,有自己的使用者(local user)、資料表空間、資料檔案,每個local user只能訪問自己的PDB,而common user只要許可權足夠,可以訪問任意PDB。

 

Oracle 12C引入了CDB與PDB的新特性,在ORACLE 12C引入的多租使用者環境(Multitenant Environment)中,允許一個資料庫容器(CDB)承載多個可插拔資料庫(PDB)。CDB全稱為Container Database,中文翻譯為資料庫容器,PDB全稱為Pluggable Database,即可插拔資料庫。在ORACLE 12C之前,執行個體與資料庫是一對一或多對一關聯性(RAC):即一個執行個體只能與一個資料庫相關聯,資料庫可以被多個執行個體所載入。而執行個體與資料庫不可能是一對多的關係。當進入ORACLE 12C後,執行個體與資料庫可以是一對多的關係。下面是官方文檔關於CDB與PDB的關係圖。 

 

CDB組件(Components of a CDB) 一個CDB資料庫容器包含了下面一些組件: ROOT組件 
ROOT又叫CDB$ROOT, 儲存著ORACLE提供的中繼資料和Common User,中繼資料的一個例子是ORACLE提供的PL/SQL包的原始碼,Common User 是指在每個容器中都存在的使用者。

 

oracle 12c 建立PDB使用者即Local User (PDB與CDB)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.