Oracle_Concept_service_names

本文介绍了使用SQL命令启动和关闭Oracle数据库的过程,并展示了数据库参数和服务的状态。通过实例演示了如何使用shutdown immediate和startup命令控制数据库,同时查看listener的状态及服务摘要。
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,连接任何一个都可以连接到数据库。

转载于:https://www.cnblogs.com/dayu-liu/p/9023319.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值