How to connect to ASM Instance using SpotlightonOracleRAC9.6Spotlight_on_Oracle_9.6.0.854_x64?
Applies To:
Oracle Database Oracle 12c R1 12.1.0.1.0 Enterprise Edition
Operating System(s) Oracle Linux 6.4 with kernel 2.6.39-400.109.17.1.el6uek.x86-64
Storage Platform(s) Dell EqualLogic PS 5000
Author:
Nirmala Sundararajan
Problem:
How to connect to ASM Instance using Spotlight on Oracle RAC 9.6?
Solution:
There are two prerequisites for establishing a connection with ASM Instance using Spotlight.
- One is the availability of a listener for the ASM instance on each node of the cluster, which can be confirmed using the lsnrctl status command.
The relevant output of the command is shown below:
[oracle@node1 bin]$ lsnrctl status
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
[oracle@node2 bin]$ lsnrctl status
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
- The other requirement is being able to connect to the ASM Instance using sqlplus from the grid infrastructure home from all the nodes of the cluster. The connection from Node1 is given below for reference.
[grid@node1 bin]$ echo $ORACLE_HOME
/u01/app/12.1.0/grid
[grid@nsnode1 bin]$ echo $ORACLE_SID
+ASM1
[grid@node1 bin]$ sqlplus / as sysasm
SQL*Plus: Release 12.1.0.1.0 Production on Fri Nov 8 17:11:08 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL>
Having ascertained that these requirements are satisfied, the following entries need to be made in the tnsnames.ora file on the Server Side and on the Client Side for establishing the connection with the ASM Instance.
The entries shown pertain to a two node Oracle RAC, where cpdb is the global database , pdb1 and pdb2 are the two pluggable databases created and cpdb1 & cpdb2 are the two instances.+ ASM is the service name and +ASM1 is the ASM Instance running on node1 and +ASM2 is the ASM instance running on node2.
Entry to be made in the tnsnames.ora file of Node1:
ASM1 =
(DESCRIPTION =
(ADDRESS_LIST=
(ADDRESS = (PROTOCOL = TCP) (HOST = OracleRACscan.dbase.lab)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM)
(UR=A)
)
)
Entry to be made in the tnsnames.ora file of Node2:
ASM2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = OracleRACscan.dbase.lab)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM)
(UR=A)
)
)
Entry to be made in the tnsnames.ora file on Client Side:
ASM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = node1.dbase.lab) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = node2.dbase.lab) (PORT = 1521))
(LOAD_BALANCE = YES)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM)
)
)
After making these entries the tnsping for ASM will be successful from the Client machine and the connection to the ASM instance will also get established.