RE: User defined context over a database link
From: Saibabu Devabhaktuni <saibabu_d_at_yahoo.com>
Date: Wed, 23 Jan 2013 23:01:47 -0800 (PST)
Message-ID: <1359010907.48612.YahooMailNeo_at_web161302.mail.bf1.yahoo.com>
You could use Powell's recommendation or something like below. You create a view by joining your original table with selects on v$globalcontext across local and remote instance. You can then create public synonym on view.
Date: Wed, 23 Jan 2013 23:01:47 -0800 (PST)
Message-ID: <1359010907.48612.YahooMailNeo_at_web161302.mail.bf1.yahoo.com>
You could use Powell's recommendation or something like below. You create a view by joining your original table with selects on v$globalcontext across local and remote instance. You can then create public synonym on view.
In the v$globalcontext query itself, you can set the context if it wasn't already set with query like below.
select decode(nvl(sum(length(value)), 1), 1,
dbms_session.set_context(....))
from v$globalcontext
where namespace=? and attribute=?;
Keep in mind that contexts are global across all RAC nodes, i.e. context set in one instance is visible in v$globalcontext on all other RAC node (you don't have to query gv$globalcontext).
Thanks,
Sai
http://sai-oracle.blogspot.com
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Jan 24 2013 - 08:01:47 CET