如何更改oracle监听程序的端口

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:219

如何更改oracle监听程序的端口

我们知道oracle 默认监听器端口为1521,为了安全起见如何更改成我们自己定义的端口呢 如1523:
首先 lsnrctl stop
更改listener.ora文件
# LISTENER.ORA Network Configuration File: D:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = d10063)(PORT = 1523))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\ora92)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = gsid)
(ORACLE_HOME = D:\oracle\ora92)
(SID_NAME = paul)
)
(SID_DESC =
(GLOBAL_DBNAME = paul)
(ORACLE_HOME = D:\oracle\ora92)
(SID_NAME = paul)
)
(SID_DESC =
(GLOBAL_DBNAME = test)
(ORACLE_HOME = D:\oracle\ora92)
(SID_NAME = test)
)
(SID_DESC =
(GLOBAL_DBNAME = copy)
(ORACLE_HOME = D:\oracle\ora92)
(SID_NAME = copy)
)
(SID_DESC =
(GLOBAL_DBNAME = pubtest)
(ORACLE_HOME = D:\oracle\ora92)
(SID_NAME = pubtest)
)
)

tnsnames.ora 文件
PUBTEST1523 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = d10063)(PORT = 1523))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pubtest)
)
)

然后再lsnrctl start
就ok了

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】