Hello, I’ve already seen this question here on the forum, in a topic titled “Oracle_sql and PDBs,” but there were no answers. I’m using the Custom SQLs feature of mk_oracle in a multi-tenant architecture Oracle environment, but the queries are only being executed for the CDB. Is it possible to specify which PDB I can execute them for, or configure it to run in any PDB except for CDB or CDB$ROOT? If it’s possible, what configuration should I apply?
we monitor PDB but from remote host. connect should be via SERVICE_NAME not SID.
each PDB has its own service_name for connection.
I need to set up the connections for ‘Custom SQLs’ (SQLS_SIDS), would you know how to indicate REMOTE_INSTANCE_[ID] here?
did you set REMOTE_INSTANCE_[SID] im mk_oracle.cfg?
REMOTE_INSTANCE_[ID]=‘USER:PASSWORD:ROLE:HOST:PORT:PIGGYBACKHOST:SID:VERSION:TNSALIAS’
(Oracle-Datenbanken überwachen)
SQL_SIDS=REMOTE_INSTANCE_[SID1], REMOTE_INSTANCE_[SID2],…, REMOTE_INSTANCE_[SIDn],
check the Oracle_plugin for usage:
CONFIGURATION CUSTOM SQLS:
The following variables for custom SQLs can be used in the configuration file
mk_oracle.cfg. Global variables can be set in mk_oracle.cfg; local variables
can be set within a section definition. Sections are defined in mk_oracle.cfg.
There are global and local variables. The local variables have precedence and
overwrite the global ones.
The variable "\$ORACLE_SID" can be used within every section.
...
SQLS_SIDS="<sid>,..." List of SIDs for which the custom SQLs will be executed.
If not set then the section will be ignored. You can use
"\$SIDS" in order to execute the custom SQLs for all SIDs.
Can be set globally or within a section definition.
...
This worked for me. ![]()
![]()
Before, I wasn’t using the prefix REMOTE_INSTANCE_ when calling it in SQLS_SIDS.
Thank you very much @irma Greetings from Brazil. ![]()
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.