[oracle@sztech ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Sep 19 16:58:13 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 1241510080 bytes
Fixed Size 9134272 bytes
Variable Size 452984832 bytes
Database Buffers 771751936 bytes
Redo Buffers 7639040 bytes
Database mounted.
Database opened.
查看当前pdb状态
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
5 ORCL MOUNTED
手动启动pdb实例orcl
SQL> alter pluggable database orcl open;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
5 ORCL READ WRITE NO
启用保存所有pdb状态, 建议加上instances=all,否则命令只对当前实例下的PDB有效。
ALTER PLUGGABLE DATABASE all save STATE;
启用保存某个pdb状态
SQL> ALTER PLUGGABLE DATABASE orcl save STATE;
Pluggable database altered.