|
[UAP6600] OMU 的 Oracle 监听端口设置以及PL/SQL的客户端配置
Update: 开启OMU的Oracle监听,是为了在调测阶段可以方便地浏览和检查数据库中的数据表内容,但正式上线前,务必删除这个Oracle监听设置。如果配置这个监听端口不删除,可能会导致OMU在反复倒换时无法启动的状况发生。谨慎!谨慎!
===========================
1、oracle/oracle 用户登录到 omu
2、执行 lsnrctl status
oracle@linux-nvk0:/home/omu> lsnrctl status
输出:
LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 18-NOV-2010 21:59:47
Copyright (c) 1991, 2008, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date 18-NOV-2010 21:29:15
Uptime 0 days 0 hr. 30 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/oradb/11g/network/admin/listener.ora
Listener Log File /opt/HUAWEI/cgp/workshop/omu/share/run_log/db_log/diag/tnslsnr/linux-nvk0/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "omu" has 1 instance(s).
Instance "omu", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
3、找到输出部分的 Listener Parameter File 行,vi 后面的文件
oracle@linux-nvk0:/home/omu> vi /opt/oracle/oradb/11g/network/admin/listener.ora
输出:
# listener.ora Network Configuration File: /opt/oracle/oradb/11g/network/admin/listener.ora
# Generated by Oracle configuration tools.
# 下面定义LISTENER进程为哪个实例提供服务,并且它对应的ORACLE_HOME和GLOBAL_DBNAME
# 其中GLOBAL_DBNAME不是必需的除非使用HOSTNAME做数据库连接
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = omu)
(ORACLE_HOME = /opt/oracle/oradb/11g)
(SID_NAME = omu)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /opt/HUAWEI/cgp/workshop/omu/share/run_log/db_log
4、找到 ADDRESS = ... 行,复制一行,改 IP 为 OMU 对外 IP,保存退出。
修改后:
# listener.ora Network Configuration File: /opt/oracle/oradb/11g/network/admin/listener.ora
# Generated by Oracle configuration tools.
# 下面定义LISTENER进程为哪个实例提供服务,并且它对应的ORACLE_HOME和GLOBAL_DBNAME
# 其中GLOBAL_DBNAME不是必需的除非使用HOSTNAME做数据库连接
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = omu)
(ORACLE_HOME = /opt/oracle/oradb/11g)
(SID_NAME = omu)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.71.176.20)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /opt/HUAWEI/cgp/workshop/omu/share/run_log/db_log
5、执行 lsnrctl stop 命令。
oracle@linux-nvk0:/home/omu> lsnrctl stop
输出:
LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 18-NOV-2010 22:03:21
Copyright (c) 1991, 2008, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
The command completed successfully
6、执行 lsnrctl start 命令。
oracle@linux-nvk0:/home/omu> lsnrctl start
输出:
LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 18-NOV-2010 22:03:27
Copyright (c) 1991, 2008, Oracle. All rights reserved.
Starting /opt/oracle/oradb/11g/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.1.0.7.0 - Production
System parameter file is /opt/oracle/oradb/11g/network/admin/listener.ora
Log messages written to /opt/HUAWEI/cgp/workshop/omu/share/run_log/db_log/diag/tnslsnr/linux-nvk0/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.71.176.20)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date 18-NOV-2010 22:03:27
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/oradb/11g/network/admin/listener.ora
Listener Log File /opt/HUAWEI/cgp/workshop/omu/share/run_log/db_log/diag/tnslsnr/linux-nvk0/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.71.176.20)(PORT=1521)))
Services Summary...
Service "omu" has 1 instance(s).
Instance "omu", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
7、OMU 配置完成,配置 Oracle 的 Net Configuration Assistant。
选择“本地Net服务名配置”,点“下一步”。
8、选择“添加”,点“下一步”。
9、服务名输入omu,点“下一步”。
10、选中TCP,点“下一步”。
11、“主机名”输入OMU 的IP地址,点下一步。
12、选择“不,不进行测试”,点“下一步”。
13、“网络服务名”输入便于自己记录和识别的名称,点“下一步”。
14、选择“否”,点“下一步”。
15、客户端 Oracle Net Configuration Assistant 配置完成,点“下一步”后点“完成”即可。
16、启动 PL/SQL Developer,Database 选择刚刚配置的“本地Net服务名”。
如果需要查看 CDE的数据库,在用户名/密码输入 cgp_1/cgp_1 即可登录。
如果需要查看 网元的数据库,在用户名/密码输入 ME5_1/ME5_1 即可登录,根据需要查看的网元 ID 修改用户名和密码。
17、提示:UAP8100 中,0号表的记录在 tbl_Table_Basic 中。
而在 UAP6600 中,0 号表的记录在 tbl_BamTableDef/tbl_FamTableDef 中。
我们可以在 PL/SQL Developer 中通过 select * from tbl_BamTableDef where I_TABLEID=*** 来查看对应ID的数据表名称 |
|