PDB的使用方法

    科技2022-07-14  132

    使用未打开的PDB,将出现如下错误

     create user infa_training IDENTIFIED BY infa_training; 次のコマンドの開始中にエラーが発生しました : 行 16 -  create user infa_training IDENTIFIED BY infa_training エラー・レポート - ORA-01109: データベースがオープンされていません。 01109. 00000 -  "database not open" *Cause:    A command was attempted that requires the database to be open. *Action:   Open the database and try the command again show pdbs;     CON_ID CON_NAME                       OPEN MODE  RESTRICTED ---------- ------------------------------ ---------- ----------          3 PDBORCL                        MOUNTED                

    pdb数据库处于MOUNTED 状态,无法使用

    打开pdb数据库

     alter pluggable database PDBORCL open; Pluggable database PDBORCLが変更されました。 show pdbs;     CON_ID CON_NAME                       OPEN MODE  RESTRICTED ---------- ------------------------------ ---------- ----------          3 PDBORCL                        READ WRITE NO     

    pdb数据库处于 READ WRITE 状态,可以使用

     

    create user infa_training IDENTIFIED BY infa_training; User INFA_TRAININGは作成されました。

    用户做成

     grant DBA,CONNECT,RESOURCE to infa_training

    Grantが正常に実行されました。

    Processed: 0.013, SQL: 8