Oracle更改默认端口
Oracle更改默认端口
启动易做图
[oracle@localhost ~]$ lsnrctl start
停止易做图
[oracle@localhost ~]$ lsnrctl stop
修改Oracle端口
第一步,停止监听服务
第二步,修改 listener.ora 和 tnsnames.ora 两个文件,把其中的Port改为自己需要的,另外listener.ora需要修改为如下格式
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBANAME = testDB)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(SID_NAME = testDB)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
黑体字部分必须要添加,否则要修改参数local_listener
第三步,启动监听即可