【翻譯自mos文章】在Oracle 12c中建立使用者--避免ORA-65096 or ORA-65049錯誤____Oracle

來源:互聯網
上載者:User

在12c中建立使用者--避免ORA-65096 or ORA-65049錯誤

來源於:
Creating users in 12c - avoiding ORA-65096 or ORA-65049. (文檔 ID 1572404.1)


適用於:
Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.
當使用之前版本的sql文法在12c中建立user時,若時使用pluggable database,an ORA-65096 or ORA-65049會遇到。

目標:
在pluggable database中建立立一個user。

解決方案:
首先,要確定的是這個新user是 COMMON_USERS 還是 LOCAL_USERS 。sqlplus / as sysdba

對於COMMON_USERS,使用者名稱務必以C##開頭

SQL>create user scott identified by tiger;ORA-65096: invalid common user or role nameSQL>create user c##scott identified by tiger;User created.


v$services 會顯示可用的pdb

SQL>select PDB from v$services;PDB--------------------------PDBORCLCDB$ROOTCDB$ROOTCDB$ROOTCDB$ROOTshow con_nameCON_NAME-----------------CDB$ROOT

 

若是為一個pluggable database建立一個local user,那麼必須在建立該user之前,選擇該pluggable database

SQL> alter session set container=PDBORCL;SQL> show con_nameCON_NAME-----------------PDBORCLSQL>create user scott1 identified by  tiger1;User created.


 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.