select * from v$version where rownum=1;BANNER CON_ID------------------------">

[20181011]12c Service "5fc5f5feaffb4fb8976b61874a94d666".txt

来源:这里教程网 时间:2026-03-03 12:05:02 作者:

[20181011]12c Service "5fc5f5feaffb4fb8976b61874a94d666".txt --//itpub上有人问的问题,12c上执行lsnrctl status显示,这些服务表示什么? 1.环境: SYS@test> select * from v$version where rownum=1; BANNER                                                                               CON_ID -------------------------------------------------------------------------------- ---------- Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0 $ lsnrctl status LSNRCTL for 64-bit Windows: Version 12.2.0.1.0 - Production on 10-OCT-2018 22:17:01 Copyright (c) 1991, 2016, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias                     LISTENER Version                   TNSLSNR for 64-bit Windows: Version 12.2.0.1.0 - Production Start Date                10-OCT-2018 19:29:43 Uptime                    0 days 2 hr. 47 min. 22 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   D:\app\oracle\product\12.2.0\dbhome_1\network\admin\listener.ora Listener Log File         D:\app\oracle\diag\tnslsnr\127.0.0.1\listener\alert\log.xml Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=5500))(Security=(my_wallet_directory=D:\APP\ORACLE\admin\test\xdb_wallet))(Presentation=HTTP)(Session=RAW) Services Summary... Service "5fc5f5feaffb4fb8976b61874a94d666" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "CLRExtProc" has 1 instance(s).   Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "c287357ce3d5470aa01668b945336f73" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "test" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "test01p" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "test02p" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "testXDB" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... The command completed successfully --//在tnsnames.ora中加入: TESTX =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = 5fc5f5feaffb4fb8976b61874a94d666)     )   ) TESTY =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = c287357ce3d5470aa01668b945336f73)     )   )   --//分别登录看看: $ sqlplus sys/btbtms@testx as sysdba ... SYS@testx> show pdbs     CON_ID CON_NAME                       OPEN MODE  RESTRICTED ---------- ------------------------------ ---------- ----------          5 TEST02P                        READ ONLY  NO SYS@testx> select sys_context('userenv','cdb_name') cdb_name , sys_context('userenv','con_name') con_name,            sys_context('userenv','service_name') serice_name from dual; CDB_NAME             CON_NAME             SERICE_NAM -------------------- -------------------- ---------- test                 TEST02P              SYS$USERS --//这里也可以确定连上pdb数据库test02p. $ sqlplus sys/btbtms@testy as sysdba ... SYS@testy> show pdbs CON_ID CON_NAME                           OPEN MODE  RESTRICTED ---------- ------------------------------ ---------- ----------          3 TEST01P                        MOUNTED --//或者执行如下: sqlplus sys/btbtms@127.0.0.1:1521/5fc5f5feaffb4fb8976b61874a94d666 as sysdba sqlplus sys/btbtms@127.0.0.1:1521/c287357ce3d5470aa01668b945336f73 as sysdba --//虽然报如下信息: string beginning "'SYS@127.0..." is too long. maximum size is 50 characters. --//实际上已经登录了. SYS@test> show pdbs     CON_ID CON_NAME                       OPEN MODE  RESTRICTED ---------- ------------------------------ ---------- ----------          2 PDB$SEED                       READ ONLY  NO          3 TEST01P                        MOUNTED          5 TEST02P                        READ ONLY  NO         --//很明显分别对应cdb数据库里面的pdb数据库test01p,test02p. SYS@test> select pdb_id,pdb_name,dbid,con_uid,guid from dba_pdbs;     PDB_ID PDB_NAME                   DBID    CON_UID GUID ---------- -------------------- ---------- ---------- --------------------------------          2 PDB$SEED             3884133861 3884133861 9EDCAED6B35A4E0EB0FFC7987DB01F33          3 TEST01P              2923790755 2923790755 C287357CE3D5470AA01668B945336F73          5 TEST02P              4197665802 4197665802 5FC5F5FEAFFB4FB8976B61874A94D666 --//实际上就是视图里面的GUID值. 2.再来看看其它情况: --//监听配置如下: # listener.ora Network Configuration File: D:\app\oracle\product\12.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER =   (SID_LIST =     (SID_DESC =       (SID_NAME = CLRExtProc)       (ORACLE_HOME = D:\app\oracle\product\12.2.0\dbhome_1)       (PROGRAM = extproc)       (ENVS = "EXTPROC_DLLS=ONLY:D:\app\oracle\product\12.2.0\dbhome_1\bin\oraclr12.dll")     )   ) LISTENER =   (DESCRIPTION_LIST =     (DESCRIPTION =       (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))     )   ) --//数据库没有启动: $ lsnrctl status LSNRCTL for 64-bit Windows: Version 12.2.0.1.0 - Production on 12-OCT-2018 21:05:04 Copyright (c) 1991, 2016, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias                     LISTENER Version                   TNSLSNR for 64-bit Windows: Version 12.2.0.1.0 - Production Start Date                12-OCT-2018 21:03:32 Uptime                    0 days 0 hr. 1 min. 35 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   D:\app\oracle\product\12.2.0\dbhome_1\network\admin\listener.ora Listener Log File         D:\app\oracle\diag\tnslsnr\127.0.0.1\listener\alert\log.xml Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc))) Services Summary... Service "CLRExtProc" has 1 instance(s).   Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully --//仅仅配置CLRExtProc静态服务. --//启动数据库到mount: SYS@test> startup mount ORACLE instance started. Total System Global Area  805306368 bytes Fixed Size                  8924064 bytes Variable Size             297796704 bytes Database Buffers          490733568 bytes Redo Buffers                7852032 bytes Database mounted. $ lsnrctl status LSNRCTL for 64-bit Windows: Version 12.2.0.1.0 - Production on 12-OCT-2018 21:08:29 Copyright (c) 1991, 2016, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias                     LISTENER Version                   TNSLSNR for 64-bit Windows: Version 12.2.0.1.0 - Production Start Date                12-OCT-2018 21:03:32 Uptime                    0 days 0 hr. 5 min. 1 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   D:\app\oracle\product\12.2.0\dbhome_1\network\admin\listener.ora Listener Log File         D:\app\oracle\diag\tnslsnr\127.0.0.1\listener\alert\log.xml Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc))) Services Summary... Service "CLRExtProc" has 1 instance(s).   Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "test" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... The command completed successfully --//仅仅test服务注册了. SYS@test> show pdbs     CON_ID CON_NAME                       OPEN MODE  RESTRICTED ---------- ------------------------------ ---------- ----------          2 PDB$SEED                       MOUNTED          3 TEST01P                        MOUNTED          5 TEST02P                        MOUNTED --//启动到open: SYS@test> alter database open ; Database altered. $ lsnrctl status LSNRCTL for 64-bit Windows: Version 12.2.0.1.0 - Production on 12-OCT-2018 21:12:29 Copyright (c) 1991, 2016, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias                     LISTENER Version                   TNSLSNR for 64-bit Windows: Version 12.2.0.1.0 - Production Start Date                12-OCT-2018 21:03:32 Uptime                    0 days 0 hr. 9 min. 1 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   D:\app\oracle\product\12.2.0\dbhome_1\network\admin\listener.ora Listener Log File         D:\app\oracle\diag\tnslsnr\127.0.0.1\listener\alert\log.xml Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=5500))(Security=(my_wallet_directory=D:\APP\ORACLE\admin\test\xdb_wallet))(Presentation=HTTP)(Session=RAW)) Services Summary... Service "5fc5f5feaffb4fb8976b61874a94d666" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "CLRExtProc" has 1 instance(s).   Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "c287357ce3d5470aa01668b945336f73" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "test" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "test01p" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "test02p" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... Service "testXDB" has 1 instance(s).   Instance "test", status READY, has 1 handler(s) for this service... The command completed successfully --//一旦打开数据库后,相关这些服务就启动了.

相关推荐