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

lfree發表於2018-10-13

[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

--//一旦開啟資料庫後,相關這些服務就啟動了.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2216288/,如需轉載,請註明出處,否則將追究法律責任。

相關文章