

In this post I will be showing you how to create an user in the CDB, what are called “Common Users” (users using the COMMON_USER_PREFIX parameter to set the user prefix at creation time) and then afterwards an user in a PDB called TECHDATABASKET , which are the “Local Users”.
1- Creating Common User in a CDB:
SQL> select instance_name, status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ cdb4 OPEN SQL> show parameters COMMON_USER_PREFIX NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ common_user_prefix string C## SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> CREATE USER c##techdatabasket IDENTIFIED BY my_password DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS CONTAINER = ALL; 2 3 4 User created.
2- Creating Local User in a PD
SQL> select name from v$pdbs; NAME ------------------------------ PDB$SEED PDBCDB4 CDBSEED CDBSEED2 MIG NONCDB TECHDATABASKET TECHDATABASKET2 8 rows selected. SQL> alter session set container=TECHDATABASKET; Session altered. SQL> CREATE USER techpdb IDENTIFIED BY my_password DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS CONTAINER = CURRENT; 2 3 4 User created.

Neste post estarei mostrando simplificamente como criar um usuário no CBD, o que chamados de “Common Users” (usuários que utilizam o parâmetro COMMON_USER_PREFIX para definir o prefixo do usuário no momento da criação) e posteriormente a criação de um usuário em um PDB chamado TECHDATABASKET, o que chamamos de “Local Users”.
1- Criando o usuário no CDB:
SQL> select instance_name, status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ cdb4 OPEN SQL> show parameters COMMON_USER_PREFIX NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ common_user_prefix string C## SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> CREATE USER c##techdatabasket IDENTIFIED BY my_password DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS CONTAINER = ALL; 2 3 4 User created.
2- Criando um usuário local no PDB:
SQL> select name from v$pdbs; NAME ------------------------------ PDB$SEED PDBCDB4 CDBSEED CDBSEED2 MIG NONCDB TECHDATABASKET TECHDATABASKET2 8 rows selected. SQL> alter session set container=TECHDATABASKET; Session altered. SQL> CREATE USER techpdb IDENTIFIED BY my_password DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS CONTAINER = CURRENT; 2 3 4 User created.


*The views expressed here are my own and do not represent those of my employer.*
Hello, I’m Bruno — a dual citizen of Brazil and Sweden. I bring a global perspective shaped by experiences in both South America and Europe, with a strong focus on collaboration and innovation across cultures. I am a Computer Scientist, PhD Candidate in Information and Communication Technologies, focusing on Data Science and Artificial Intelligence, and hold dual Master’s degrees in Data Science and Cybersecurity. With over fifteen years of international experience spanning Brazil, Hungary, and Sweden, I have collaborated with global organizations such as IBM, Playtech, and Oracle, as well as contributed remotely to projects across multiple regions. My professional interests include Databases, Cybersecurity, Cloud Computing, Data Science, Data Engineering, Big Data, Artificial Intelligence, Programming, and Software Engineering, all driven by a deep passion for transforming data into strategic business value.