多租户库19c修改服务名后pdb监听失效,需重启数据库才能生效恢复。只重启监听不起作用。
ORA-12514: TNS:listener does not currently know of service requested in connect
SQL> alter session set container=pdb;
ERROR:
ORA-44787: Service cannot be switched into.
重启库:
[grid@rac1:/home/grid]$ srvctl stop database -d jyc -o immediate
[grid@rac1:/home/grid]$ srvctl start database -d jyc
测试过程:
[oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 14:55:09 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 14:52:14 Uptime 0 days 0 hr. 2 min. 54 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "42b133224fc259cde0634ccfa8c0b908" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "dgjyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "pdb" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 14:55:12 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 14:52:14 Uptime 0 days 0 hr. 2 min. 57 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "42b133224fc259cde0634ccfa8c0b908" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "dgjyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "pdb" has 1 instance(s).--修改service之前可以看到存在pdb Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ sqlplus sys/oracle@192.168.207.25:1521/pdb as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 14:55:21 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 14:55:28 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 14:52:14 Uptime 0 days 0 hr. 3 min. 14 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "42b133224fc259cde0634ccfa8c0b908" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "dgjyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "pdb" has 1 instance(s).--修改service之前可以看到存在pdb Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ sqlplus sys/oracle@192.168.207.25:1521/jyc as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 14:55:36 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 ^[[A[oracle@rac1:/home/oracle]$ sqlplus sys/oracle@192.168.207.25:1521/dgjyc as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 14:55:41 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 SQL> show parameter service; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string jyc,dgjyc SQL> alter system set service_names='jyc' scope=both sid='*';--做修改 System altered. SQL> show parameter name; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cdb_cluster_name string cell_offloadgroup_name string db_file_name_convert string db_name string jyc db_unique_name string jyc global_names boolean FALSE instance_name string jyc1 lock_name_space string log_file_name_convert string pdb_file_name_convert string processor_group_name string NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string jyc SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 14:56:24 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 14:52:14 Uptime 0 days 0 hr. 4 min. 9 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully --此时发现没有pdb服务了 [oracle@rac1:/home/oracle]$ sqlplus sys/oracle@192.168.207.25:1521/dgjyc as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 14:56:35 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor Enter user-name: ^C [oracle@rac1:/home/oracle]$ sqlplus sys/oracle@192.168.207.25:1521/jyc as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 14:56:41 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 [oracle@rac1:/home/oracle]$ sqlplus sys/oracle@192.168.207.25:1521/pdb as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 14:56:48 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor Enter user-name: ^C ---pdb无法连接 [oracle@rac1:/home/oracle]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 14:56:54 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB READ WRITE NO SQL> alter session set container=pdb; ERROR: ORA-44787: Service cannot be switched into. SQL> !oerr ora 44787 44787, 0000, "Service cannot be switched into." // *Document: Yes // *Cause: The service did not exist in the new pluggable database or the service was not started in the pluggable database. // *Action: Use a valid service name for the pluggable database or start the service in the pluggable database first. SQL> alter session set container=pdb service=jyc;--需指定service才能进入,不重启数据库的情况下监听无法监听 Session altered. SQL> alter system register; System altered. SQL> !lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 14:59:50 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 14:52:14 Uptime 0 days 0 hr. 7 min. 35 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 [oracle@rac1:/home/oracle]$ [oracle@rac1:/home/oracle]$ [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 15:00:54 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 15:00:45 Uptime 0 days 0 hr. 0 min. 9 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 15:00:55 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 15:00:45 Uptime 0 days 0 hr. 0 min. 10 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 15:01:36 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 15:00:45 Uptime 0 days 0 hr. 0 min. 51 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 15:01:38 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 15:00:45 Uptime 0 days 0 hr. 0 min. 52 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ [oracle@rac1:/home/oracle]$ [oracle@rac1:/home/oracle]$ [oracle@rac1:/home/oracle]$ ---restart database -bash: ---restart: command not found [oracle@rac1:/home/oracle]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 29-DEC-2025 15:04:48 Copyright (c) 1991, 2020, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 29-DEC-2025 15:00:45 Uptime 0 days 0 hr. 4 min. 2 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.76)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.207.26)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "42b133224fc259cde0634ccfa8c0b908" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jyc" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "jycXDB" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... Service "pdb" has 1 instance(s). Instance "jyc1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1:/home/oracle]$ sqlplus sys/oracle@192.168.207.25:1521/pdb as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 15:05:01 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 [oracle@rac1:/home/oracle]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 29 15:05:08 2025 Version 19.9.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB READ WRITE NO SQL> alter session set container=pdb; Session altered. SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0 [oracle@rac1:/home/oracle]$相关参考:
https://blog.csdn.net/cowboy90/article/details/119753891