Home » RDBMS Server » Performance Tuning » SQL statement in the SGA (Oracle 10g , Linux AS4)
SQL statement in the SGA [message #303478] Fri, 29 February 2008 08:41 Go to next message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Hello All,

How can I find out which user's SQL statement is in the SGA either Library Cache or the Database buffer Cache ,be it the Select or the Insert.

I've tried in v$SQL,v$SQLAREA,v$SQLTEXT using the hash_value but I could'nt succeed. Don't know if I'm right or wrong in this.

Any help on this please.

Regards,
Raj

[Updated on: Fri, 29 February 2008 08:48]

Report message to a moderator

Re: SQL statement in the SGA [message #303487 is a reply to message #303478] Fri, 29 February 2008 09:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
A SQL statement is NEVER in buffer cache.
Buffer cache contains data blocks and not SQL statement.

Cached (and so active) SQL statements are in SQL area.

Regards
Michel
Re: SQL statement in the SGA [message #303500 is a reply to message #303487] Fri, 29 February 2008 10:43 Go to previous messageGo to next message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Ok,

Is there anyway where we can find out the presence of SQL statements what we are passing which we can identify by the hash_value .

I was asked , what SQL statements are present in the Library cache or buffer cache? Is that possible in any of the possible way(if available)
Re: SQL statement in the SGA [message #303505 is a reply to message #303500] Fri, 29 February 2008 10:51 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I repeat: "There is no SQL statement in buffer cache".
I repeat: "Cached (and so active) SQL statements are in SQL area" and you see them in v$sql.
You can post several times the question, it is always the same answer.
If you want a different answer, post a different question.

Regards
Michel
Re: SQL statement in the SGA [message #303512 is a reply to message #303505] Fri, 29 February 2008 11:20 Go to previous message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Oh! SO strong .

Sorry and Thank you
Previous Topic: Oracle Database Stop working
Next Topic: Slow query
Goto Forum:
  


Current Time: Sat Dec 10 22:22:36 CST 2016

Total time taken to generate the page: 0.10310 seconds