修改oracle监听端口修改端口号的整体步骤: 1.1 查看当前监听的状态 1.2 停止监听 1.3 修改监听文件的端口号 1.4 修改初始化参数local_listener 1.5 重启监听器 1.6 修改完毕,使用新端口登录测试 1.7 重新配置db control 实践步骤: 1.1 查看当前监听的状态[test@ASI-1 ~]$lsnrctl status
1.2 停止监听[test@ASI-1~]$lsnrctl stop
1.3修改监听文件的端口号 把端口号修改为1521,分别修改listener.ora和tnsname.ora文件 [test@ASI-1 ~]$ cd/usr/opt/oracle/product/10.2.0/db_1/network/admin/ [test@ASI-1 admin]$ pwd /usr/opt/oracle/product/10.2.0/db_1/network/admin [test@ASI-1~]$vi listener.ora [test@ASI-1~]$vi tnsnames.ora 1.4 修改初始化参数local_listenerlocal_listener默认是不设的。不过要是不用1521端口的话(默认为:1521),有时用工具连数据库的时候老是链接不上。必须要重新连接很多次。设置了local_listener就好啦。 [test@ASI-1~]$sqlplus / as sysdba SQL> show parameter local_listener NAME TYPE VALUE
系统已更改。 1.5 重启监听器[test@ASI-1~]$lsnrctl start
|
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-MAR-2011 18:21:04 Copyright (c) 1991, 2005, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.100)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production Start Date 11-MAR-2011 17:56:42 Uptime 0 days 0 hr. 24 min. 21 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /usr/opt/oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /usr/opt/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.100)(PORT=1521))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "orcl" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully |
1.6.3 [test@ASI-1 ~]$tnsping orcl
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 11-MAR-2011 18:34:36 Copyright (c) 1997, 2005, Oracle. All rights reserved. Used parameter files: /usr/opt/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl))) OK (0 msec) |
emctl stop dbconsole 删除原来的db control和repository知识库 emca -deconfig dbcontrol db -repos drop -cluster 或者 emca -config dbcontrol db 这里需要输入相关的数据库信息 emctl start dbconsole |
|