【Oracle】ORACLE12C中創建用戶及用戶連接

CDB中只能創建c##全局用戶,而PDB中才可創建普通用戶,且普通用戶連接PDB需要用tns方式連接。

CDB中:

create user c##user1 identified by password;
grant resource,connect to c##user1;

[oracle@rhel75 admin]$ sqlplus c##user1/password

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 26 05:02:38 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Last Successful login time: Sun Apr 26 2020 04:58:44 -04:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

C##USER1@orcl19c>

 

PDB中:

create user puser1 identified by password;
grant resource,connect to puser1;

[oracle@rhel75 admin]$ sqlplus puser1/password@PORCL

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 26 05:02:59 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Last Successful login time: Sun Apr 26 2020 04:59:39 -04:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

PUSER1@PORCL>

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章