如何更改oracle监听程序的端口
如何更改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了