红联Linux门户
Linux帮助

Win远程Linux下的ASM实例

发布时间:2016-01-13 15:35:02来源: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都可以远程访问。


红帽Linux 6.5上配置ASM流程:http://www.linuxdiyf.com/linux/12331.html

在Solaris平台中ASM所需磁盘的Format过程:http://www.linuxdiyf.com/linux/11305.html

ASM更换磁盘名称:http://www.linuxdiyf.com/linux/2297.html