日期:2014-05-16  浏览次数:20378 次

远程连接ASM实例
从网上看到ORACLE的文档:340277.1中有说怎么个连法,我试验了一把,发现只要在listener.ora中加入一个静态注册就可以了。

试验中的ASM参数:

使用原来的orapw+ASM

remote_loging_passwordfile=shared

修改以下:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/oracle/product/10.2.0/ASM)
      (PROGRAM = extproc)    
    )
   (SID_DESC =
      (SID_NAME = +ASM)
      (ORACLE_HOME = /u01/app/oracle/oracle/product/10.2.0/ASM)
    )

  )

tnsname.ora中的配置:

asm =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.128.4.248)(PORT = 1521))
    )
    (CONNECT_DATA =
      (server = dedicated)
      (sid = +asm)
      (ur=a)
    )
  )

文档中使用的是sid_name,我发现不能用,改为SID后可以正常使用.



不能远程连接是因为ASM向监听器注册的状态为BLOCKED,根据上面的方法,静态注册的ASM状态为UNKNOWED。关于BLOCKED的状态,ORACLE的解释为:

The blocked status is being set by the instance, indicating that the database is not able to accept connections. This can be caused by the instances not being mounted or mounted in a restricted state.

Since an ASM instance never mounts a database, it will always be shown in 'BLOCKED' status.
The administration of an ASM instance is intended to be done on the server itself and not remotely.
This is the default and expected behaviour for 10gR1 and newer databases.

在11g中,ASM的状态为UNBLOCKED

转自:http://space.itpub.net/280958/viewspace-664983