oracle 12c pdbseed tips

Oracle 12c pdbseed Tips

Oracle 12c 的 pdb$seed,默认打开模式为read only
如果要修改pdb$seed的状态,则需在当前会话修改”_oracle_scripts”为true

[email protected]> show pdbs

	CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
		 2 PDB$SEED                       READ ONLY  NO
		 3 PDB1                           READ WRITE NO
[email protected]> alter session set "_oracle_script"=true;

Session altered.

[email protected]> alter pluggable database pdb$seed close immediate;

Pluggable database altered.

[email protected]> show pdbs

	CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
		 2 PDB$SEED                       MOUNTED
		 3 PDB1                           READ WRITE NO
[email protected]> alter pluggable database pdb$seed open;

Pluggable database altered.
[email protected]> show pdbs;

	CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
		 2 PDB$SEED                       READ WRITE NO
		 3 PDB1                           READ WRITE NO
[email protected]> 
[email protected]> create table tab01 (col1 varchar2(10));

Table created.

[email protected]> insert into tab01 values('aaaa');

1 row created.

[email protected]> commit;

Commit complete.

[email protected]> select * from tab01;

COL1
----------
aaaa

[email protected]> 
[email protected]> alter pluggable database pdb$seed close immediate;

Pluggable database altered.

[email protected]> 
[email protected]> alter pluggable database pdb$seed open read only;

Pluggable database altered.

[email protected]> 

To be continue….

Have a good life! 2018/07 via LinHong