你好,游客 登录 注册 搜索
背景:
阅读新闻

Oracle中tnsnames.ora的作用

[日期:2013-10-01] 来源:Linux社区  作者:victor0725 [字体:大 中 小]

step4:重启数据库


SQL> shut immediate
startup
Database closed.
Database dismounted.
Oracle instance shut down.
SQL>
ORACLE instance started.


Total System Global Area 1054593024 bytes
Fixed Size 1349616 bytes
Variable Size 507512848 bytes
Database Buffers 541065216 bytes
Redo Buffers 4665344 bytes
Database mounted.
alter system register;
Database opened.
SQL> SQL>
System altered.


oracle@node1 admin]$ lsnrctl status LISTENER_1


LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 30-SEP-2013 21:45:38


Copyright (c) 1991, 2011, Oracle. All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=1.1.1.10)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER_1
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 30-SEP-2013 21:42:30
Uptime 0 days 0 hr. 3 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/db/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/node1/listener_1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=1.1.1.10)(PORT=1522)))
Services Summary...
Service "haha" has 1 instance(s).
Instance "vicdb", status READY, has 1 handler(s) for this service...
Service "hehe" has 1 instance(s).
Instance "vicdb", status READY, has 1 handler(s) for this service...
Service "vicdb" has 1 instance(s).
Instance "vicdb", status READY, has 1 handler(s) for this service...
Service "vicdbXDB" has 1 instance(s).
Instance "vicdb", status READY, has 1 handler(s) for this service...
The command completed successfully


[oracle@node2 admin]$ sqlplus vic@vic2


SQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 30 21:45:26 2013


Copyright (c) 1982, 2011, Oracle. All rights reserved.


Enter password:


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>

 


能正常启动,能正常连接,说明重启数据库时候能重新读取tnsnames。ora,是否有其它办法,可以再试,应该可以使用lsnrctl reload xxx来实现。

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款