1

I'd like to know what is my RAC cluster name using SQL query. I've found out that it can be retrieved using Oracle tool cemutlo -n or just ocrdump (see http://www.br8dba.com/tag/how-to-display-oracle-cluster-name/). However, it's not possible in this case, because on target environment, I can only execute SQL queries and I don't have access to DBMS installation directory.

I've found out (here https://community.oracle.com/thread/2510788?tstart=0) that it can be done using some unusual queries:

SELECT a.ID, a.CLUSTER_ID FROM TABLE(DBMS_DATA_MINING.GET_MODEL_DETAILS_OC('CLUS_OC_1_15',NULL,NULL,1,0,0)) a

select * from table(dbms_data_mining.get_model_details_km('CLUS_KM_1_25'))

However, they don't work on my environment and I'm unable to create new model.

Most preferably, I'd just read this from some kind of v$/gv$ tables - but I can't find it there. I guess that's because cluster is far below DBMS.

Greg Witczak
  • 1,634
  • 4
  • 27
  • 56
  • 1
    it's an interesting question, so +1. But i couldn't find any way how to do it using SQL query. I'm not sure that the cluster name is stored in the DB, because when renaming the cluster node-by-node (MOS Doc ID 1967916.1), you will have both old and new names in parallel... – MaxU - stand with Ukraine Mar 07 '16 at 16:29
  • @MaxU It not necessary has to be kept in DB, maybe there is a way to ask DBMS to call `cemutlo -n` / `ocrdump`? – Greg Witczak Mar 07 '16 at 16:51
  • you may want check this: http://www.dba-oracle.com/t_execute_operating_system_os_command_oracle.htm, but i guess it would be easier and more secure to find it out different way - maybe ask responsible sys admins to run `cemutlo -n` and provide you results... – MaxU - stand with Ukraine Mar 07 '16 at 16:57
  • @MaxU calling OS functions seems to be little bit too risky and might require additional permissions. Asking user for input is also not an option. So i guess there is no way to do that from DBMS :( – Greg Witczak Mar 10 '16 at 11:51

1 Answers1

0

Finally, I found out that there is no way to do that :(.

Greg Witczak
  • 1,634
  • 4
  • 27
  • 56
  • 1
    I do not know if this is universally applicable, but I use the `remote_listener` parameter, which is normally set to the SCAN listener and that is in our cases always the `cluster name` (minus the port stuff of course). – A.Steinel Nov 07 '19 at 09:03