Beruflich Dokumente
Kultur Dokumente
We will be doing most of the exercises with HR account. You need to unlock it first.
First you need to connect to ORACLE as super user (sys as sysdba), and move from container
database to pluggable database where the HR user is located inside. Then we will unlock the HR
account. You cannot connect to it by default.
1. Open windows Command prompt (Winkey + R, cmd).
2. sqlplus
3. login: sys as sysdba
4. password: the password when you installed ORACLE DB.
Go to next page:
Switching from container database to pluggable database
First of all we need to see where we are located. Most probably we are inside the container
database
CON_NAME
------------------------------
CDB$ROOT
NAME
--------------------------------------------------------------------------------
CON_ID
----------
PDB$SEED
ORCLPDB
Most important here is for you to see that you have “orclpdb” database (if it is missing, contact
me, Viorel)
Now it’s time to switch to the pluggable database orclpdb:
Session altered.
You have now switched from container database to the pluggable database orclpdb
We can confirm it with the following command:
CON_NAME
------------------------------
ORCLPDB
You have now switched to pluggable database “orclpdb”, where the HR account is located
But this database might still be closed. You need to see it’s state
A pluggable database might be open or closed depending on its state.
Let’s verify what is the current state of the pluggable database orclpdb:
NAME
--------------------------------------------------------------------------------
OPEN_MODE
----------
ORCLPDB
READ WRITE
Here the dabase is already opened, but if the last line states: MOUNTED, you need to open it:
Success. A database contain users (often schema and user are synonyms), some of them are
locked however, like HR user
Unlocking HR account
USERNAME
--------------------------------------------------------------------------------
DEFAULT_COLLATION
--------------------------------------------------------------------------------
IMP ALL
--- ---
HR
107 11-SEP-19 NO N NO
USING_NLS_COMP
NO NO
User altered.