oracle multi-tenant (operating system credentials in PDB)

Create operating system users
Insert picture description here
Insert picture description here
Use the DBMS_CREDENTIAL software package to create relevant database credentials for each container
show pdbs show CON_NAME
BEGIN
DBMS_CREDENTIAL.create_credential(
credential_name =>'cdb1',
username =>'cdb1_zhangsan',
password =>'AAbb123');
END;
/

BEGIN
DBMS_CREDENTIAL.create_credential(
credential_name =>'pdb2',
username =>'pdb2_lisi',
password =>'AAbb123');
END;
/
Insert picture description here
BEGIN
DBMS_CREDENTIAL.create_credential(
credential_name =>'pdb3',
username =>'pdb3_wu',
password =>'AAbb123');
END;
/
Insert picture description here
Check if all the credentials exist and are owned by the root container.
SELECT con_id, owner, credential_name
FROM cdb_credentials;
Insert picture description here
Insert picture description here
define the default operating system credentials of the container
ALTER SYSTEM SET PDB_OS_CREDENTIAL=cdb1_user_cred SCOPE=SPFILE;
Insert picture description here
SHUTDOWN IMMEDIATE;
CREATE PFILE='D:\pfile.txt' FROM SPFILE;
Insert picture description here
Insert picture description here
add a line
*.
Insert picture description here
CREATE SPFILE FROM PFILE='D:\pfile.txt';
STARTUP;
SHOW PARAMETER PDB_OS_CREDENTIAL
Insert picture description here
ALTER SESSION SET CONTAINER=pdb3;
Insert picture description here
ALTER SYSTEM SET PDB_OS_CREDENTIAL=pdb3 SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP;
SHOW PARAMETER PDB_OS_CREDENTIAL
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_39568073/article/details/114872017