ORA-02019 While SELECT From A View Owned By Another User Using Dblink

Quick case today.

This week I had a client experiencing ORA-02019 while SELECT from a View with dblink and CONNECT BY PRIOR … START WITH into SELECT.
The situation involved Views on a DB which need to be accessed by a groups of users from another DB using proxy user and a DB link but encounter this ORA error.

The root cause?

ORA-02019 while performing select on a view or while selecting a view owned by another user, with dblink, is a match to Bug 26558437 – DATABASE LINK FAILS WITH ORA-2019 WHEN SELECT ANOTHER USER VIEW.

But MOS doesn’t have workaround besides applying patch, as usual. What we did and solved on our case?

We created a materialized view refreshed every 15 mins (solution supported this delay0 using the DBLink if the view owner.
In this case, the other users instead of executing the query on the view, will be actually querying the table created (and refreshed) by the mview code, which would be only be executed by the mview owner.

By the way, 2 good side effects:
1) Once view was executed more often then the period of refresh, this solution is also saving some efforts database wise, once executing select from mview is way better then the view code, besides not using the network on dblink
2) If the remote database get slow, or down, the data would be still available from last mview refresh.

Conclusions:
1) Use MATERIALIZED VIEW!
2) MOS not always give you all the steps. Sometimes you can easily solve your problem by thinking a little bit more on the root cause problem.

Cheers

Installing EM 13c Agent on AIX 5.3

Hi,

Issues to install an Enterprise manager 13c agent on Database on AIX 5.3? Well, I found some errors I’d like to share with you:

First, to deploy agent manually by agentDeploy script, seems the ResponseFile is not working properly in some cases, so I recommend passing parameters manually:

./agentDeploy.sh AGENT_BASE_DIR = / u01 / app / oracle / agent13c -ignorePrereqs -invPtrLoc /etc/oraInst.loc AGENT_PORT = 3872 EM_UPLOAD_PORT = 4903 OMS_HOST =  ORACLE_HOSTNAME =  AGENT_INSTANCE_HOME = / u01 / app / oracle / agent13c / agent_inst AGENT_REGISTRATION_PASSWORD =  SCRATCHPATH = / backup / joao / temp

Al good? Not really, when starting the services, I started facing:

ERROR: Agent Configuration Failed SEVERE: emctl secure agent command failed with status = 1SEVERE: emctl secure agent command failed with status = 1SEVERE: emctl secure agent command failed with status = 1

Hmm… Why? So, seems this error is due to AIX secure with OMS (Linux). After a while, here is the workaround:

$ emctl secure agent -protocol TLS

That’s it! Try testing it now:

$ emctl upload agent

EMD upload completed successfully

Great! Agent installed. Now, to autodiscover further targets on host:

$ emctl config agent addinternaltargets

Now monitoring is complete!

[]s, Bicca.