修改oracle所在的linux主机名-单机
2015-12-08 23:46
519 查看
修改Oracle所在linux主机名
原主机名为node3,需改为node4
一、linux系统方面的修改
[root@node3 /]# hostname
node3
[root@node3 /]# vim /etc/hosts
192.168.56.16 node4 -- 改为node4
[root@node3 /]# vim /etc/sysconfig/network
HOSTNAME=node4 --node3 改为node4
[root@node3 /]# hostname node4
[root@node3 /]# hostname
node4
[root@node3 /]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
二、Oracle配置方面的修改
1. 执行lsnrctl status出错。
[oracle@node4 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 08-DEC-2015 23:38:19
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node3)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist --因目标主机或对象不存在,
连接失败
TNS-12560: TNS:protocol adapter error --协议适配器错误
TNS-00515: Connect failed because target host or object does not exist --因目标主机或对象不存在, 连接失败
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 08-DEC-2015 23:34:33
Uptime 0 days 0 hr. 3 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/node3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node3)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
这是因为listener.ora文件中主机名与现在本机的主机名不符。重新配置listener.ora文件
2. 修改监听配置文件
[oracle@node4 ~]$ vim $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node3)(PORT
= 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
将"HOST = node3"改为"HOST = node4"
3. 启动监听程序
[oracle@node4 ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 08-DEC-2015 23:40:42
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_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/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/node4/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node4)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node4)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 08-DEC-2015 23:40:42
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/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/node4/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node4)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@node4 ~]$
监听程序正常启动,修改成功。
原主机名为node3,需改为node4
一、linux系统方面的修改
[root@node3 /]# hostname
node3
[root@node3 /]# vim /etc/hosts
192.168.56.16 node4 -- 改为node4
[root@node3 /]# vim /etc/sysconfig/network
HOSTNAME=node4 --node3 改为node4
[root@node3 /]# hostname node4
[root@node3 /]# hostname
node4
[root@node3 /]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
二、Oracle配置方面的修改
1. 执行lsnrctl status出错。
[oracle@node4 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 08-DEC-2015 23:38:19
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node3)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist --因目标主机或对象不存在,
连接失败
TNS-12560: TNS:protocol adapter error --协议适配器错误
TNS-00515: Connect failed because target host or object does not exist --因目标主机或对象不存在, 连接失败
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 08-DEC-2015 23:34:33
Uptime 0 days 0 hr. 3 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/node3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node3)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
这是因为listener.ora文件中主机名与现在本机的主机名不符。重新配置listener.ora文件
2. 修改监听配置文件
[oracle@node4 ~]$ vim $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node3)(PORT
= 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
将"HOST = node3"改为"HOST = node4"
3. 启动监听程序
[oracle@node4 ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 08-DEC-2015 23:40:42
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_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/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/node4/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node4)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node4)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 08-DEC-2015 23:40:42
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/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/node4/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node4)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@node4 ~]$
监听程序正常启动,修改成功。
相关文章推荐
- oracle数据库block、tigger、function、package
- oracle 分区删除三种方式
- ORACLE预定义角色
- ORACLE角色(通过DBA创建)
- ORACLE权限
- ORACLE用户管理
- ORACLE表空间的创建修改删除
- 连接本地Oracle 11g时 ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务
- ORACLE初次安装自动安装软件包
- The Secrets of Oracle Row Chaining and Migration
- Oracle 中使用tkprof来查看比较delete,truncate,drop
- oracle 数据导入导出命令
- oracle迁移mysql数据库注意
- CentOS 6 安装Oracle11g
- 更改oracle字符集
- Oracle数据库学习<一>
- 20151208 再次搭建Oracle11g环境 ocp 047 20-40
- ORACLE 9i中statpack的简单用法
- Oracle 手动修改spfile后的现象记录
- 基于Linux下 Oracle 备份策略(RMAN)