Oracle Query v$session report ORA-04031 Error Resolution

Source: Internet
Author: User
Tags sessions oracle database

The customer's database has tools to log in to an Oracle database during transfers occasionally ORA-04031, after analysis because the tool needs to query v$session, which is identified as a bug 12808696–shared pool memory leak of " Hng:all Sessi "Memory (Doc ID 12808696.8), reproduce the error as follows
Node 1 for query report ORA-4031

  code is as follows copy code
sql> Select COUNT (*) from v$session;
&NBSP
Count (*)
----------
1536
 
sql> Select COUNT (*) from gv$session;
&NBSP
Count (*)
----------
2089
 
sql> Select/*+ Full (t)/count (*) from gv$session T
 
COUNT (*)
----------
2053
 
sql> select * from Gv$session;
Select * from gv$session
*
ERROR at line 1:
Ora-12801:error signaled in parallel query server PZ93, I Nstance
OCS_DB_2:ZJOCS2 (2)
ora-04031:unable to allocate 308448 bytes of shared memory ("Shared
Pool", "UNK Nown object "," SGA Heap (1,0) "," Hng:all sessions data for API. ")

Node 2 for query report ORA-04031

The code is as follows Copy Code
Sql> select * from Gv$session;
SELECT * FROM Gv$session
*
ERROR at line 1:
Ora-12801:error signaled in parallel query server PZ95, instance
OCS_DB_2:ZJOCS2 (2)
ora-04031:unable to allocate 308448 bytes of shared memory ("shared
Pool "," Unknown Object "," SGA Heap (6,0) "," Hng:all sessions data for API. ")

Sql> select * from V$session;
SELECT * FROM V$session
*
ERROR at line 2:
ora-04031:unable to allocate 308448 bytes of shared memory ("shared
Pool "," Unknown Object "," SGA Heap (7,0) "," Hng:all sessions data for API. ")

Through the above analysis: Confirmation is node 2 v$session encounter bug 12808696, resulting in the node in the query v$session and Gv$session reported ORA-04031, and in Node 1 query v$session normal, query gv$ Session newspaper ORA-04031.

Bugs are fixed in 11.1.0.6, all versions of 10g are not repaired and can only be temporarily avoided by a temporary reboot, noting that the bug cannot be resolved through flash Shared_pool
If you have permission to progress a query SR 3-7670890781: Query v$session blocking_session field, a ora-04031 error occurred

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.