Oracle_Concept_service_names

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  830930944 bytes
Fixed Size            2257800 bytes
Variable Size          578817144 bytes
Database Buffers      243269632 bytes
Redo Buffers            6586368 bytes
Database mounted.
Database opened.
SQL> show parameter name;

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name             string
db_file_name_convert             string
db_name                  string     yhdb
db_unique_name                 string     yhdb
global_names                 boolean     FALSE
instance_name                 string     yhdb1
lock_name_space              string
log_file_name_convert             string
processor_group_name             string
service_names                 string     CDC, CAC, CMC
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@yhdb tmp]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2018 10:28:04

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                11-MAY-2018 09:30:59
Uptime                    0 days 0 hr. 57 min. 5 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0.4/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/yhdb/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.109)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.210)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "CAC" has 1 instance(s).
  Instance "yhdb1", status READY, has 1 handler(s) for this service...
Service "CDC" has 1 instance(s).
  Instance "yhdb1", status READY, has 1 handler(s) for this service...
Service "CMC" has 1 instance(s).
  Instance "yhdb1", status READY, has 1 handler(s) for this service...
Service "yhdb" has 1 instance(s).
  Instance "yhdb1", status READY, has 1 handler(s) for this service...
Service "yhdbXDB" has 1 instance(s).
  Instance "yhdb1", status READY, has 1 handler(s) for this service...

service_names可以设置为多个,最初的那个service_names一直存在。此外在pl/sql中,IP后指定的其实是service_names。若有多个service_names,连接任何一个都可以连接到数据库。

posted @ 2018-05-11 10:31  dayu.liu  阅读(152)  评论(0编辑  收藏  举报