Sync PDB failed with ORA-959 during ‘alter user c##hydra temporary tablespace temp1’
While opening of a new pdb which was created from PDB$SEED, error ORA-959 occurred due to missing temp tablespace.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 UPDB MOUNTED
SQL> alter pluggable database UPDB open;
Warning: PDB altered with errors.
Plugin violations shows these failures which need action to open the PDB clean.
SQL> col NAME for a20
SQL> col CAUSE for a20
SQL> col MESSAGE for a20
SQL> col ACTION for a20
SQL> set lines 200 pages 1000
SQL> SELECT name,cause,message,action from PDB_PLUG_IN_VIOLATIONS;
NAME CAUSE MESSAGE ACTION
-------------------- -------------------- -------------------- --------------------
UPDB Sync Failure Sync PDB failed with
ORA-959 during 'alt
er user c##hydra tem
porary tablespace te
mp1'
UPDB Sync Failure Sync PDB failed with
ORA-959 during 'alt
er user system tempo
rary tablespace temp
1'
Workaround the problem by manually creating the missing temporary tablespace.
SQL> alter session set container=updb;
Session altered.
SQL> CREATE temporary tablespace TEMP1 tempfile '/u01/app/oracle/oradata/hydrupgd/updb/temp1.dbf' size 1G;
Tablespace created.
PDB is opened without any restricted mode.
SQL> alter pluggable database updb close;
Pluggable database altered.
SQL> alter pluggable database updb open;
Pluggable database altered.