Bootstrap

【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>

 

 

;