Priv issue
Moris, February 14, 2019 - 1:21 pm UTC
The problem with proxy user is that he will get all privs on owner objects and hence dml truncate ..what ever he likes.
February 14, 2019 - 3:51 pm UTC
True, but OP ruled out most of the safer alternatives.
logon trigger option
Mark Wooldridge Wooldridge, February 14, 2019 - 6:16 pm UTC
It seems the alter session set current_schema was not allowed if done manually by the user. What about a trigger for the schema:
create or replace trigger msw_login_trg
after logon
on msw.test_emp
begin
execute immediate 'alter session set current_schema=hcr_schema';
end;
/
The question also did not mention if a public synonym was allowed.
February 15, 2019 - 2:02 am UTC
True, but I'm not a fan of public synonyms although multi-tenant helps a little in that regard.
Please elaborate. Didnt catch whole meaning
Moris, February 14, 2019 - 6:31 pm UTC
"True, but OP ruled out most of the safer alternatives."
February 15, 2019 - 2:01 am UTC
The OP (original poster) said:
Requirement is I would like to refer to that table without creating synonym.. without using schema name and also without altering the session to use current schema after logging in like alter session set current_schema = HCR_SCHEMA;
which is sort of like saying:
"I want to achieve X, without using any of the features that let me achieve X" :-)
original requirements
Mark Wooldridge, February 15, 2019 - 2:56 pm UTC
The requirement is fairly specific but it did start out with "I" which could be interpreted as the user having to do the action, it does not specifically state the system could not do any of those things fore you.
I cannot think of any reason why this would be applicable in an actual system, for security you would think that access to things should be very defined.