SQL can execute in wrong Schema
AIX53+10.2.0.2 RAC[@more@]
Once a bad reload has occurred the wrong schema continues to be used for that session until the cursor is aged out or invalidated.
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.
Interim patches are available for 10.2.0.2 on some platforms under .
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:This can occur for DML or SELECT SQL .
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.
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 .
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7318139/viewspace-918946/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Can one execute an operating system command from PL/SQL?SQL
- Can one rename a database user (schema)?Database
- EXECUTE IMMEDIATE dynamic sql in procedureSQL
- How Python MongoDB Toolkit Ming Can Ease Schema MaintenancePythonMongoDBAINaN
- What is wrong?
- 動態 SQL、EXECUTE IMMEDIATE、using、into、returningSQL
- EXECUTE IMMEDIATE動態SQL的使用總結SQL
- 複習execute immediate動態sql語法SQL
- Last_SQL_Error: Could not execute Update_rows eventASTSQLError
- 無痛 SQL Schema 的10 條軍規SQL
- PARSING_USER_ID,PARSING_SCHEMA_ID,PARSING_SCHEMA_NAME in V$SQLSQL
- PLSQL Language Referenc-PL/SQL動態SQL-本地動態SQL(EXECUTE IMMEDIATE語句)SQL
- MySQL: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1MySql
- rs.open與connection.execute(sql)的區別SQL
- The Execute Disable/No Execute CPU feature is not enabled for this machineMac
- MySQL 5.7 performance_schema庫和sys庫常用SQLMySqlORM
- VMware: ESXi requires the Execute Disable/No Execute CPU feature to be enabledUI
- DB2 PL/SQL How much reorganisations are recommended on a specific schemaDB2SQL
- oracle execute immediate動態sql組合執行comment小記OracleSQL
- java cmd executeJava
- 32bit Pl/SQL developer 報can not find oci.dllSQLDeveloper
- 11G can flush one SQL Cursor out of shared poolSQL
- MySQL案例01:Last_SQL_Errno: 1755 Cannot execute the current event group in the parallel modeMySqlASTParallel
- Execute to Parse 指標指標
- SP2-0678: Column or attribute type can not be displayed by SQL*PlusSQL
- 【SCRIPTS】快速清理Schema中所有表和序列的PL/SQL指令碼SQL指令碼
- PL/SQL 中 execute immediate,select 語句沒有into 執行未報錯SQL
- java.lang.IllegalArgumentException: Wrong state classsJavaException
- Flowable 6.6.0 BPMN使用者指南 - 17 高階用例 - 17.5 執行自定義SQL(Execute custom SQL)SQL
- Can'tgetKerberosrealmROS
- ftp "CanFTP
- [Err] 1231 - Variable 'sql_mode' can't be set to the value of 'NULLSQLNull
- app:processReleaseResources, Failed to execute aaptAPPAIAPT
- 理解EXECUTE_TO_PARSE(二)
- 理解EXECUTE_TO_PARSE(一)
- ExecutorService之submit與executeMIT
- PostgreSQL:Schema 管理SQL
- MySQL Performance SchemaMySqlORM