Win遠程Linux下的ASM執行個體

來源:互聯網
上載者:User

Win遠程Linux下的ASM執行個體

一、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都可以遠端存取。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.