修改oracle默认端口_oracle
一、修改默認(rèn)端口1521
1、查看數(shù)據(jù)庫(kù)監(jiān)聽(tīng)狀態(tài),并獲取監(jiān)聽(tīng)文件路徑
[root@localhost admin]# lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-MAR-2020 08:58:44
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 09-DEC-2019 15:25:27
Uptime 99 days 17 hr. 33 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "tdr" has 1 instance(s).
Instance "tdr", status READY, has 1 handler(s) for this service...
Service "tdrXDB" has 1 instance(s).
Instance "tdr", status READY, has 1 handler(s) for this service...
The command completed successfully
2、先停止監(jiān)聽(tīng)
[root@localhost admin]# lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-MAR-2020 08:59:00
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
The command completed successfully
3、修改listener.ora 文件里面的port設(shè)置
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=2345)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
4、重啟監(jiān)聽(tīng),可看到已修改
lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-MAR-2020 08:59:49
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=2345)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=2345)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-MAR-2020 08:59:49
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=2345)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
5、修改初始化參數(shù)local_listener
SQL> alter system set local_listener="(address = (protocol = tcp)(host = 59.42.192.216)(port = 3306))";
System altered.
至此修改完成
總結(jié)
以上是生活随笔為你收集整理的修改oracle默认端口_oracle的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: C语言 · 十六进制转八进
- 下一篇: 脆皮五花肉怎样加热才能让皮不软?