ASM QUICK REF‎ > ‎

How to connect to ASM instance from a remote client

posted Mar 14, 2011, 2:26 PM by Sachchida Ojha
This solution cannot be accomplished using Network Manager (GUI)

The solution is to
   * Edit the listener.ora on ASM server
   * Edit the tnsnames.ora on the client
   * Setup your remote login password for your ASM instance on the ASM server
   * Set your SYS password using ORAPWD for the ASM instance
   * Use the properly formatted connect string to connect with your tool

1) Edit the listener.ora on ASM server

   a) Logon to the ASM/Database server

   b) Locate your listener.ora (typically located in the $ORACLE_HOME/network/admin)

   c) Add a SID_LIST_LISTENER entry for your ASM instance (see example below)

EXAMPLE

SID_LIST_LISTENER =
    (SID_LIST =
      (SID_DESC =
         (SID_NAME = +ASM)
         (ORACLE_HOME = c:\oracle\app\product\11.1.0\db_1)
      )
   )

   d) Stop the listener

lsnrctl stop

   e) restart the listener

lsnrctl start


2) Edit the tnsnames.ora on the client

   a) Logon to the client machine that will be used to connect to the ASM instance
          NOTE: the client machine can also be the ASM/Database server (ie for DBCONTROL)

   b) Locate your tnsnames.ora (typically in the $ORACLE_HOME/network/admin)

   c) Add an entry (tnsalias) for your ASM instance (see example)

EXAMPLE

 

ASM =
   (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = kbcook-1)(PORT = 1521))
      (CONNECT_DATA =
         (SERVER = DEDICATED)
         (SID_NAME = +ASM)
         (UR=A)
      )
   )

3) Setup your remote login password for your ASM instance on the ASM server

   a) Logon to the ASM/Database server

   b) Locate the parameter file for your ASM instance (typically $ORACLE_HOME/dbs/init+ASM.ora [unix] or $ORACLE_HOME/dbs/init+ASM.ora [windows] )

   c) Edit the parameter file and add

         remote_login_passwordfile = exclusive ... for stand alone ASM setups
         remote_login_passwordfile = shared ... for ASM setups that also use Real Application Cluster (RAC)
 
   d) Save the file

   NOTE: It may be required that an PFILE be created from an SPFILE in order to be able to edit the file properly ... once the line have been added ... the process can be reversed

                 For more details Note 249664.1 Pfile vs SPfile ... may be used

4) Set your SYS password using ORAPWD for the ASM instance


  
a) Logon to the ASM/Database server

   b) Locate your orapw<sid> file for your ASM instance (typically $ORACLE_HOME/dbs/orapw+ASM)

   c) Rename the file to orapw<sid>.old
 
   d) Run orapwd to reset the password (see example below)

EXAMPLE
 
mv "orapw+ASM" "orapw+ASM.old"
orapwd file=orapw+ASM password=kbcook

5) Use the properly formatted connect string for your tool

Connnect to the ASM instance using the password (#4 above) and the tnsalias (#2 above)

EXAMPLES

C:\oracle\app\product\11.1.0\db_1\BIN\SQLPLUS.EXE "sys/kbcook@asm as sysdba"

<OR>

sqlplus "sys/kbcook@asm as sysdba"

<OR>

sqlplus "sys@asm as sysdba" ... then supply the password when prompted
Comments