oracle services 启动会将对应pdb带起来(反之不会) ,mount下只有pdb default 会启动
[oracle@rac3 admin]$ srvctl add service -d cdb -s pdb1_srv -pdb pdb1 -r rac1,rac2,rac3
PRKO-2101 : Failed to find database instances rac1,rac2,rac3
[oracle@rac3 admin]$ srvctl add service -d cdb -s pdb1_srv -pdb pdb1 -r cdb1,cdb2,cdb3
[oracle@rac3 admin]$ srvctl start service -s pdb1_srv -d cdb
srvctl start service -d cdb -role
SQL> show pdbs;
? ? CON_ID CON_NAME ? ? ? ? ? ? ? ? ? ? ? OPEN MODE ?RESTRICTED
---------- ------------------------------ ---------- ----------
? ? ? ? ?2 PDB$SEED ? ? ? ? ? ? ? ? ? ? ? READ ONLY ?NO
? ? ? ? ?3 PDB ? ? ? ? ? ? ? ? ? ? ? ? ? ?READ WRITE YES
? ? ? ? ?5 PDB1 ? ? ? ? ? ? ? ? ? ? ? ? ? READ WRITE NO
[oracle@rac2 ~]$ lsnrctl service|grep pdb
Service "pdb.cj.com" has 1 instance(s).
Service "pdb1.cj.com" has 1 instance(s).
Service "pdb1_srv.cj.com" has 1 instance(s).
?
SQL> alter pluggable database pdb1 close abort instances=all;
Pluggable database altered.
SQL> show pdbs;
? ? CON_ID CON_NAME ? ? ? ? ? ? ? ? ? ? ? OPEN MODE ?RESTRICTED
---------- ------------------------------ ---------- ----------
? ? ? ? ?2 PDB$SEED ? ? ? ? ? ? ? ? ? ? ? READ ONLY ?NO
? ? ? ? ?3 PDB ? ? ? ? ? ? ? ? ? ? ? ? ? ?READ WRITE YES
? ? ? ? ?5 PDB1 ? ? ? ? ? ? ? ? ? ? ? ? ? MOUNTED
SQL> exit
[oracle@rac2 ~]$ lsnrctl service|grep pdb
Service "pdb.cj.com" has 1 instance(s).
Service "pdb1.cj.com" has 1 instance(s).
------------------service起来会把pdb带起来-------------------------
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac3 admin]$ srvctl start service -d cdb -role
[oracle@rac2 ~]$ lsnrctl service|grep pdb
Service "pdb.cj.com" has 1 instance(s).
Service "pdb1.cj.com" has 1 instance(s).
Service "pdb1_srv.cj.com" has 1 instance(s).
[oracle@rac3 admin]$ s
SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec 9 15:35:30 2023
Version 19.20.0.0.0
Copyright (c) 1982, 2022, Oracle. ?All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
SQL> show pdbs;
? ? CON_ID CON_NAME ? ? ? ? ? ? ? ? ? ? ? OPEN MODE ?RESTRICTED
---------- ------------------------------ ---------- ----------
? ? ? ? ?2 PDB$SEED ? ? ? ? ? ? ? ? ? ? ? READ ONLY ?NO
? ? ? ? ?3 PDB ? ? ? ? ? ? ? ? ? ? ? ? ? ?READ WRITE YES
? ? ? ? ?5 PDB1 ? ? ? ? ? ? ? ? ? ? ? ? ? READ WRITE NO
SQL>?
[oracle@rac2 ~]$ lsnrctl service|grep pdb
Service "pdb.cj.com" has 1 instance(s).
Service "pdb1.cj.com" has 1 instance(s).
-------------------------pdb起来不会带动service起来------------------
SQL> ?alter pluggable database pdb1 close abort instances=all;
Pluggable database altered.
SQL> alter pluggable database pdb1 open;
Pluggable database altered.
?
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac3 admin]$ srvctl start service -d cdb -role
[oracle@rac3 admin]$?
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!