oracle之 单实例监听修改端口
Oracle 单一主机多个实例多个监听器配置要点
1. 一台服务器主机, 有多个实例, 如: TSDB/ORCL; 又需要配置多个监听器
2. 需要指定不同的LISTENER端口
3.pmon只会动态注册port等于1521的监听器, 其它端口则pmon不能动态注册listener, 要想让pmon动态注册listener, 需要设置local_listener参数
[oracle@12c01 admin]$ cat listener.ora
ANDYCDB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ANDYCDB_TEST =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))
)
)
[oracle@12c01 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ANDYCDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = andycdb)
)
)
LISTENER_ANDYCDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
PDB01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb01)
)
)
LISTENER_PDB01 =
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521)
LISTENER_TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))
)
#################
lsnrctl操作:
LSNRCTL> set current_listener ANDYCDB_TEST
Current Listener is ANDYCDB_TEST
LSNRCTL> start
Starting /home/oracle/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias ANDYCDB_TEST
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 10-APR-2018 21:59:17
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
The listener supports no services
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias ANDYCDB_TEST
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 10-APR-2018 21:59:17
Uptime 0 days 0 hr. 1 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
The listener supports no services
The command completed successfully
-- 设置一个监听端口
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))';
System altered.
[oracle@12c01 admin]$ lsnrctl status andycdb_test
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 10-APR-2018 22:38:32
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias ANDYCDB_TEST
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 10-APR-2018 21:59:17
Uptime 0 days 0 hr. 39 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
Services Summary...
Service "4f44590eb7b74390e0531018db0a1976" has 1 instance(s).
Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "andycdb" has 1 instance(s).
Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "andycdbXDB" has 1 instance(s).
Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
Instance "andycdb", status READY, has 1 handler(s) for this service...
The command completed successfully
-- 设置多个监听端口
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522)),(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1521)))';
System altered.
oracle之 单实例监听修改端口的更多相关文章
- Oracle 11g RAC 环境下单实例非缺省监听及端口配置
如果在Oracle 11g RAC环境下使用dbca创建单实例数据库后,Oracle会自动将其注册到缺省的1521端口及监听器.大多数情况下我们使用的为非缺省监听器以及非缺省的监听端口.而且在Orac ...
- Windows环境下修改Oracle实例监听IP地址
Windows环境下修改Oracle实例监听IP地址. 配置文件路径:<ORACLE_HOME>\NETWORK\ADMIN 如:C:\Oracle11gR2\product\11.2.0 ...
- oracle ogg 单实例单向简单搭建测试(oracle-oracle)
昨天突然接到消息说有一个线上的ogg出现了问题,看是否能修复,由于ogg以前玩的少,所以就加急搞了个测试环境,练习了一把 环境 db1,db2(单实例)ip: 1*,1*sid: orcl,ogg1o ...
- Oracle 19c单实例部署
目录 Oracle 19c单实例部署: 1.配置yum: 2.安装rpm包: 3.设置hostname: 4.配置hostname解析: 5.配置时钟同步服务(ntp): 6.检查及配置内核参数: 7 ...
- CentOS7 上以 RPM 包方式安装 Oracle 18c 单实例
安装阿里云 YUM 源 https://opsx.alibaba.com/mirror?lang=zh-CN 一.安装Oracle数据库 1.安装 Oracle 预安装 RPM yum -y loca ...
- Oracle 11g 单实例静默安装实战记录(linux)
oracle 11g 单实例静默安装 AUTHOR:Oracle_Ran 环境规划: OS Version : Red Hat Enterprise Linux Server release 6.7 ...
- Linux平台oracle 11g单实例 + ASM存储 安装部署 快速参考
操作环境:Citrix虚拟化环境中申请一个Linux6.4主机(模板)目标:创建单机11g + ASM存储 数据库 1. 主机准备 2. 创建ORACLE 用户和组成员 3. 创建以下目录并赋予对应权 ...
- oracle静态与动态监听
在运行lsnrctl命令的status时,常会看到如下返回值: 服务“test”包含1个例程. 例程"mydata",状态 UNKOWN,包含此服务的一个处理程序... 服务 ...
- Oracle 11g 单实例到单实例OGG同步实施文档-OGG initial load
Oracle 11g 单实例到单实例OGG同步实施文档-OGG initial load 2018-06-07 00:514730原创GoldenGate 作者: leo 本文链接:https://w ...
随机推荐
- 从原理上理解如何由震源机制一个节面的解:strike,dip,rake可以求出另一个节面的解
首先,需要回到最原始的地震矩的表达式: 已知strike,dip,rake 根据strike和dip可以求出v,根据strike,dip,rake,可以求出u. 把求出来的v和u互换,相当于原来的位错 ...
- 18-10-18 Python 思维导图 很棒的
赠送 14 张 Python 知识点思维导图 来源 | Python学习联盟 本文主要涵盖了 Python 编程的核心知识(暂不包括标准库及第三方库). 按顺序依次展示了以下内容的一系列思维导图: ...
- day 58 关于bootstrap
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- 2-log4j2之使用根控制器输出日志到控制台
一.添加maven依赖 <!-- 使用aliyun镜像 --> <repositories> <repository> <id>aliyun</i ...
- mongodb启动出现Failed to connect to 127.0.0.1:27017 after 5000ms milliseconds,giving up
今天一早准备继续学习mongodb,但是在命令行运行mongo.exe报错 出错原因:mongod一不小心被非法关闭,留下了一个mongod.lock, 将数据库给锁定了 解决方法: 1)在data路 ...
- 简单的SpringWebFlow例子及遇到的问题
这段时间在看<Spring 实战>里面有讲Spring Web Flow,觉得里面的例子过于复杂,不适合新手,于是在网上找了个例子,跟着写 以下是项目的目录,我是基于maven搭建项目的 ...
- 团队-爬取豆瓣电影TOP250-需求分析
需求: 1.搜集相关电影网址 2.实现相关逻辑的代码 项目步骤: 1.通过豆瓣网搜索关键字,获取相关地址 2.根据第三方包实现相关逻辑
- 2019-04-03-day025-异常与日志
内容回顾 考试 6个小时 120分 (100+20) 15:00-18:00 笔试 60分 19:00-22:00 上机考试 40分 + 20分 60分及格不算附加题 简答题 读程序 简单编程 编程题 ...
- vuejs中v-bind绑定class时的注意事项
关于v-bind绑定class的实例 作用:可用于不同样式之间的切换 <!DOCTYPE html> <html lang="en"> <head&g ...
- xargs用法
xargs是一个很有用的命令,它可以实现并行,同&有异曲同工之妙,在大批量管理服务器时非常有用 xargs命令是给其他命令传递参数的一个过滤器,也是组合多个命令的一个工具.它擅长将标准输入数据 ...