I'm trying to get the wallet status for the current instance of an Oracle 11g 2 node RAC DB (but ideally all RDBMS versions). The following command returns values for both nodes instead of one:
SQL> select a.status from gv$encryption_wallet a, gv$instance b where a.INST_ID=(select INST_ID from gv$instance where instance_number=userenv('instance')) and a.WRL_TYPE='HSM';
STATUS
------------------------------
OPEN
OPEN
If I break it down it doesn't show the info for node 2 .. only node 1. And I'm running the cmd from node 2.
SQL> select INST_ID from gv$instance where instance_number=userenv('instance');
INST_ID
----------
2
SQL> select a.status from gv$encryption_wallet a, gv$instance b where a.INST_ID=2 and a.WRL_TYPE='HSM';
no rows selected
It's problem something really obvious but I just can't see it at the moment. Any help appreciated. Thank you.