You can access a container in various ways in a CDB. For example, you can use the SQL*Plus CONNECT command, and you can use an ALTER SESSION SET CONTAINER statement to switch the container of the current session.
– Switch the container using Alter system set container … – Use connect command to connect to PDB using network alias.
ALTER SESSION SET CONTAINER = pdbdev; SELECT tablespace_name FROM dba_tablespaces; ALTER PLUGGABLE DATABASE orabase DEFAULT TABLESPACE oradata
This can happen due SQL> -- to db creation scripts adding columns to the middle of a table vs SQL> -- upgrade scripts adding to the end via ALTER TABLE ADD SQL> SQL> alter session set container=CDB$ROOT
1. When trying to set inmemory_size within a PDB when inmemory_size is 0 in the CDB ORA-02096: specified initialization parameter is not modifiable with this option. SQL> alter session set container = cdb$root
SQL> alter session set container=PDB1; Session altered. Did I actually move containers? How can I tell? Instead of selecting INSTANCE_NAME from V$INSTANCE; we have two new SHOW commands that will provide us the information we are looking for.
alter session set container = kona; set serveroutput off.
Posts about alter session set container= written by jameshuangsj.
3. Using alter session command and setting the container to the desired container.
SET_GCTX_SCHEMA ('ALTER SESSION SET current_schema=HR','CLIENT_A'), Oracle Database Cross Session Data Cache