SQL can execute in wrong Schema

AIX53+10.2.0.2 RAC[@more@]

Description

If different schemas have objects (tables / views / synonyms etc..) with identical names and sessions from different schemas execute IDENTICAL SQL statements then it is possible for such SQL sentences to get executed against the wrong schema objects if a cursor gets reloaded in a certain manner.
eg:
Consider USER1 and USER2 both with their own table MYTAB.
If sessions are concurrently executing "SELECT col FROM MYTAB" then it is possible, under certain conditions, for USER1 to execute the statement in USER2's schema regardless of any permissions granted.
This can occur for DML or SELECT SQL .
Once a bad reload has occurred the wrong schema continues to be used for that session until the cursor is aged out or invalidated.

Workaround or Resolution

The issue can be avoided by prefixing object names with the schema name.
eg: In the above example change the SQL to use
"select mycol from A.mytable" for user A and
"select mycol from B.mytable" for user B.


If SQL cannot be changed then it can help to reduce shared pool load (as the problem occurs when cursors are reloaded having
been aged out / invalidated). Using DBMS_SHARED_POOL.KEEP for affected cursors can also help.

The best solution to prevent this problem is to get the fix.


Patches

This issue is expected to be fixed in the 10.2.0.3 Patch Set.

Interim patches are available for 10.2.0.2 on some platforms under Patch 5458753 .

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7318139/viewspace-918946/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7318139/viewspace-918946/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值