Changing the Containers
We can use the
alter session set container statement to change between the containers.
The common user need to have set
container privilege to switch between containers.
SQL> show con_name
CON_NAME
——————————
CDB$ROOT
——————————
CDB$ROOT
SQL> show user;
USER is “SYS”
USER is “SYS”
SQL> create user C##Manzoor
identified by ahamed;
User created.
SQL> grant set container to
C##manzoor;
Grant succeeded.
SQL> grant connect, resource to
c##manzoor container=all;
Grant succeeded.
SQL> conn c##manzoor
Enter password:
Connected.
Enter password:
Connected.
SQL> alter session set container =
pdb_hr;
Session altered.
SQL> show con_name;
CON_NAME
——————————
PDB_HR
——————————
PDB_HR
SQL> alter session set container =
pdb_purchase;
Session altered.
SQL> show con_name;
CON_NAME
——————————
PDB_PURCHASE
——————————
PDB_PURCHASE
When using alter session set
container below scenario will be applied.
a) Alter session set container can be
executed only by the common user who has given set container privilege.
b) Logon triggers will not be triggered.
c) Transaction that are not committed nor roll backed after switching from one container to another container.
b) Logon triggers will not be triggered.
c) Transaction that are not committed nor roll backed after switching from one container to another container.
No comments:
Post a Comment