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

Win远程Linux下的ASM实例

[日期:2016-01-12] 来源:Linux社区  作者:Linux [字体: ]

一、Win远程Linux下的ASM实例
1.Linux下的监听文件
[grid@myrac1 admin]$ cat listener.ora
# listener.ora Network Configuration File: /g01/app/grid/product/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = myrac1)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /g01/app/grid

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
2.监听状态
[grid@myrac1 admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-FEB-2014 05:48:20

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                    LISTENER
Version                  TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                23-FEB-2014 05:37:13
Uptime                    0 days 0 hr. 11 min. 7 sec
Trace Level              off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File  /g01/app/grid/product/11.2.0/grid/network/admin/listener.ora
Listener Log File        /g01/app/grid/diag/tnslsnr/myrac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myrac1)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "hjj" has 1 instance(s).
  Instance "hjj", status READY, has 1 handler(s) for this service...
Service "hjjXDB" has 1 instance(s).
  Instance "hjj", status READY, has 1 handler(s) for this service...
The command completed successfully
3.在win客户端tns文件中添加如下内容
LIN_ASM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.171)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = +ASM)
      (INSTANCE_NAME = +ASM)

    )
  )
4.在win下测试
C:\Users\Administrator>tnsping lin_asm

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 23-FEB-2014 21:52:49

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:
C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.171)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = +ASM) (INSTANCE_NAME = +ASM)))
OK (360 msec)
C:\>sqlplus sys/oracle@lin_asm as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 23 21:55:11 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
SQL> select instance_name,host_name,version,status from v$instance;

INSTANCE_NAME                    HOST_NAME                                          VERSION                    STATUS
-------------------------------- -------------------------------------------------- ---------------------------------- --
+ASM                            myrac1.oracle.com                                  11.2.0.1.0                STARTED
另外飞总的博客中提到UR=A,用于asm远程访问使用的参数,我的win和linux都安装的是oracle11gR2,测试中发现在动态监听加不加UR=A都可以远程访问。

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

本文永久更新链接地址http://www.linuxidc.com/Linux/2016-01/127332.htm

linux
相关资讯       ASM  ASM实例 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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