一、oracle 11g 修改默认监听端口1521

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

1、查看监听状态:

SQL> !lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 12-NOV-2013 01:36:29

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=b28-122.jd.com)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date 22-OCT-2013 04:02:12

Uptime 20 days 22 hr. 34 min. 16 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/oracle/product/11.2.0/db_1/network/admin/listener.ora

Listener Log File /u01/oracle/diag/tnslsnr/b28-122/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=b28-122.jd.com)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "yoon" has 1 instance(s).

Instance "yoon", status READY, has 1 handler(s) for this service...

Service "yoonXDB" has 1 instance(s).

Instance "yoon", status READY, has 1 handler(s) for this service...

The command completed successfully

2、停止监听

SQL> !lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 12-NOV-2013 02:37:43

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=b28-122.jd.com)(PORT=1521)))

The command completed successfully

3、修改tnsnames.ora和listener.ora文件中端口号

将1521修改为1515

4、在数据库中初始化参数local_listener

SQL> show parameter local_listener;

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

local_listener string

SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = b28-122.jd.com)(PORT = 1515))';

System altered.

SQL> show parameter local_listener;

NAME TYPE VALUE

------------------------------------ --------------------------------- ------------------------------

local_listener string (ADDRESS = (PROTOCOL = TCP)(HO

ST = b28-122.jd.com)(PORT = 15

15))

5、启动监听

SQL> !lsnrctl start

6、查看监听

SQL> !lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 12-NOV-2013 02:43:08

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=b28-122.jd.com)(PORT=1515)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date 12-NOV-2013 02:42:15

Uptime 0 days 0 hr. 0 min. 53 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/oracle/product/11.2.0/db_1/network/admin/listener.ora

Listener Log File /u01/oracle/diag/tnslsnr/b28-122/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=b28-122.jd.com)(PORT=1515)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1515)))

Services Summary...

Service "yoon" has 1 instance(s).

Instance "yoon", status READY, has 1 handler(s) for this service...

Service "yoonXDB" has 1 instance(s).

Instance "yoon", status READY, has 1 handler(s) for this service...

The command completed successfully

二、换IP后的oracle 11g修改方法

这是手动修改方式 若有问题以后再修正,当然还有最经典的修改方式:emca -reconfig dbconctrol db -repos recreate

=================================================================================================经典修改方法

OracleDBConsoleorcl 服务因下列错误而停止: 
系统找不到指定的路径

原因主要还是更改了主机名或换了IP导致的问题,更改了相应的文件名:

D:/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_192.168.0.136_dgtest(更换新IP或机器名) //dgtest为oracle_sid

D:/oracle/product/10.2.0/db_1/asdfjkl_dgtest(更换新IP或机器名)//dgtest为oracle_sid

在目錄d:/oracle/product/10.2.0/db_1/install/portlist.ini裡找到EM是使用哪個port

Microsoft Windows XP [版本 5.1.2600] 
(C) 版权所有 1985-2001 Microsoft Corp. 
C:/Documents and Settings/youandy>set oracle_sid=dgtest 
C:/Documents and Settings/youandy>emca -repos recreate

EMCA 开始于 2008-3-25 8:17:19 
EM Configuration Assistant 10.2.0.1.0 正式版 
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息: 
数据库 SID: dgtest 
监听程序端口号: 1521 
SYS 用户的口令: 
SYSMAN 用户的口令: 
SYSMAN 用户的口令: 
是否继续? [yes(Y)/no(N)]: y 
2008-3-25 8:17:48 oracle.sysman.emcp.EMConfig perform 
信息: 正在将此操作记录到 D:/oracle/product/10.2.0/db_1/cfgtoollogs/emca/dgtest/e 
mca_2008-03-25_08-17-19-上午.log。 
2008-3-25 8:17:49 oracle.sysman.emcp.EMReposConfig dropRepository 
信息: 正在删除 EM 资料档案库 (此操作可能需要一段时间)... 
2008-3-25 8:19:37 oracle.sysman.emcp.EMReposConfig invoke 
信息: 已成功删除资料档案库 
2008-3-25 8:19:37 oracle.sysman.emcp.EMReposConfig createRepository 
信息: 正在创建 EM 资料档案库 (此操作可能需要一段时间)... 
2008-3-25 8:23:04 oracle.sysman.emcp.EMReposConfig invoke 
信息: 已成功创建资料档案库 
已成功完成 Enterprise Manager 的配置 
EMCA 结束于 2008-3-25 8:23:04

C:/Documents and Settings/youandy>emctl start dbconsole 
Environment variable ORACLE_SID not defined. Please define it.

C:/Documents and Settings/youandy>set oracle_sid=dgtest

C:/Documents and Settings/youandy>emctl start dbconsole 
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation. 
All rights reserved. 
http://192.168.0.136:1158/em/console/aboutApplication 
Starting Oracle Enterprise Manager 10g Database Control ...OracleDBConsoledgtest

服务正在启动 . 
OracleDBConsoledgtest 服务无法启动。

系统出错。

发生系统错误 3。

系统找不到指定的路径。

C:/Documents and Settings/youandy> 
C:/Documents and Settings/youandy>emca -config dbcontrol db

EMCA 开始于 2008-3-25 8:37:02 
EM Configuration Assistant 10.2.0.1.0 正式版 
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息: 
数据库 SID: dgtest 
已为数据库 dgtest 配置了 Database Control 
您已选择配置 Database Control, 以便管理数据库 dgtest 
此操作将移去现有配置和默认设置, 并重新执行配置 
是否继续? [yes(Y)/no(N)]: y 
监听程序端口号: 1521 
SYS 用户的口令: 
DBSNMP 用户的口令: 
SYSMAN 用户的口令: 
用户名/口令无效。 
SYSMAN 用户的口令: 
SYSMAN 用户的口令: 通知的电子邮件地址 (可选): 
通知的发件 (SMTP) 服务器 (可选): 
-----------------------------------------------------------------

已指定以下设置

数据库 ORACLE_HOME ................ D:/oracle/product/10.2.0/db_1

数据库主机名 ................ asdfjkl 
监听程序端口号 ................ 1521 
数据库 SID ................ dgtest 
通知的电子邮件地址 ............... 
通知的发件 (SMTP) 服务器 ...............

----------------------------------------------------------------- 
是否继续? [yes(Y)/no(N)]: y 
2008-3-25 8:38:11 oracle.sysman.emcp.EMConfig perform 
信息: 正在将此操作记录到 D:/oracle/product/10.2.0/db_1/cfgtoollogs/emca/dgtest/e 
mca_2008-03-25_08-37-02-上午.log。 
2008-3-25 8:38:14 oracle.sysman.emcp.util.PortManager isPortInUse 
警告: 指定的端口 5540 已在使用。 
2008-3-25 8:38:14 oracle.sysman.emcp.util.PortManager isPortInUse 
警告: 指定的端口 5520 已在使用。 
2008-3-25 8:38:14 oracle.sysman.emcp.util.PortManager isPortInUse 
警告: 指定的端口 1158 已在使用。 
2008-3-25 8:38:14 oracle.sysman.emcp.util.DBControlUtil stopOMS 
信息: 正在停止 Database Control (此操作可能需要一段时间)... 
2008-3-25 8:38:26 oracle.sysman.emcp.util.DBControlUtil startOMS 
信息: 正在启动 Database Control (此操作可能需要一段时间)... 
2008-3-25 8:39:06 oracle.sysman.emcp.EMDBPostConfig performConfiguration 
信息: 已成功启动 Database Control 
2008-3-25 8:39:10 oracle.sysman.emcp.EMDBPostConfig performConfiguration 
警告: 无法创建 Database Control 快捷方式 
2008-3-25 8:39:10 oracle.sysman.emcp.EMDBPostConfig performConfiguration 
信息: >>>>>>>>>>> Database Control URL 为 http://asdfjkl:1158/em <<<<<<<<<<< 
已成功完成 Enterprise Manager 的配置 
EMCA 结束于 2008-3-25 8:39:10

oracle 11g 修改默认监听端口1521相关推荐

  1. oracle外网监听端口,oracle 11g 修改默认监听端口1521

    OS: Oracle Linux Server release 5.7 DB: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - ...

  2. aix oracle监听配置_LINUX系统下Oracle修改默认监听端口号操作

    各位头条的朋友们大家好,打算在今后的一段时间为大家分享一批与云计算相关的干货运维技术指南,相信这些操作手册类的文章一定会给大家一些实际的帮助,提升IT技能的@.@大家都知道ORACLE的默认监听端口号 ...

  3. 一、Asp.Net Core WebAPI——修改默认监听端口

    参考文档 添加host.json文件 {"urls": "https://localhost:44389;http://localhost:44380" } 在 ...

  4. oracle11g怎么重新设置端口,oracle11g修改或增加默认监听端口

    ■■oracle11g修改默认监听端口 正常情况下,oracle数据库服务端口一般是默认的1521端口,因为安全等原因可能需要修改此端口号为其他端口,以下为标准的步骤概要. ■在sqlplus修改数据 ...

  5. linux下oracle端口修改,LINUX oracle修改默认监听端口号1521

    LINUX oracle修改默认监听端口号1521 发布时间:2020-06-11 21:55:06 来源:51CTO 阅读:18821 作者:yiloudesha ORACLE的默认监听端口号为15 ...

  6. oracle中srv添加监听服务,Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务...

    Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务 解决过程: 1. 找到listener.ora监听文件,具体位置:D:\app\Administrator ...

  7. 修改Oracle数据库默认监听端口

    我们在使用Oracle的时候,经常默认的1521端口,不给使用,本文给与一种修改默认端口的方法,具体如下: 1.查看监听状态        $ lsnrctl status        可以看到这个 ...

  8. 修改php-fpm监听端口,php-fpm配置详解

    php5.3自带php-fpm /usr/local/php/etc/php-fpm.conf pid = run/php-fpm.pid pid设置,默认在安装目录中的var/run/php-fpm ...

  9. Apache修改服务器监听端口,练习 - 04 - 配置 Apache 服务器的监听端口

    提供 Web 服务的 Apache 服务器,可以通过 httpd.conf 这个文件来设置,httpd 是 Apache 的一个主程序,你也可以把它当成就是 Apache 服务器.有时候 Apache ...

最新文章

  1. 我是如何在尼日利亚的沃里创立Google Developers Group GDG分会的,并达到了100位成员...
  2. php 查看init,php 中init log
  3. javaSocket与C通信
  4. pythontcp服务器教程_tcp服务端无线为多个客户端服务|python基础教程|python入门|python教程...
  5. zcmu1156: 新年彩灯Ⅰ
  6. Qt线程之QRunnable的使用详解
  7. Smarty中的ob_start问题
  8. Linux中断(interrupt)子系统之三:中断流控处理层
  9. 第四章:Django模型——添加 Event发布会的表 报错
  10. 不了解这些“高级货”,活该你面试当炮灰。。。【石杉的架构笔记】
  11. 【HNOI2003】【BZOJ1216】操作系统(模拟,优先队列)
  12. php插入mp3,PHP网站插入音乐
  13. java递归算法详解_Java递归算法详解(动力节点整理)
  14. pyCharm汉化方法
  15. SpringBoot和hadoop组件Hive的集成
  16. Java实现多文档文本编辑器
  17. newsgroup_txt
  18. c++语言“case”,C++ switch case详解
  19. app打开QQ与陌生人聊天
  20. 杭州-SQL杭州国迈软件有限公司笔试题

热门文章

  1. 线性拟合与曲线拟合,直接在图上添加拟合曲线、拟合方程、判别系数R2和P值
  2. 行业追踪,2023-07-04,受特斯拉中报影响,汽车零部件放量强势拉升,不调整
  3. window的location对象详解
  4. vue html css,HTML+CSS入门 在vue中使用animate.css
  5. tmpfs探索与虚拟机扩容
  6. 智达信股票自动交易软件 3.2.1207.3
  7. 哈尔滨java开发工资_给哈尔滨Java开发初学者的几个学习建议
  8. android 找不到 theme,android – 找不到资源:Theme.Leanback
  9. 【Android UI】贝塞尔曲线 ⑥ ( 贝塞尔曲线递归算法原理 | 贝塞尔曲线递归算法实现 )
  10. 150 Quotes About Success And Life by Wael El-Manzalawy