How to get the following RAC info
Hi,
We have a requirement of getting RAC information from the middleware. From the appplication server we can get hold of the Connection object and exceute SQLS or PLSQL to get the info:
The data we need:
Is RAC Enabled or not?
I guess this we can get from IF dbms_utility.is_cluster_database
hosts: This we can get from SELECT Host_NAME from gv$instance;
Information needed on how to get :
ports:
serviceName: eg ERP
connectionUrl: eg:
jdbc:oracle:thin:@(DESCRIPTION=
(LOAD_BALANCE=on)
(ADDRESS=(PROTOCOL=TCP)(HOST=clusnode-1vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=clusnode-2vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=clusnode-3vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=clusnode-4vip)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=ERP)))
AdrBase and AdrHome for each RAC Instance:
select * from v$diag_info where name = 'ADR Base'
select * from v$diag_info where name = 'ADR Home'
ie how to get this info for each RAC instance . Note there is INST_ID for v$diag_info. Is this the cluster ID?