Home » SQL & PL/SQL » SQL & PL/SQL » sql_id (Oracle Database Server 10g )
sql_id [message #388911] Thu, 26 February 2009 10:57 Go to next message
averion
Messages: 42
Registered: January 2009
Location: US
Member
Experts,

How to find out which SQL_ID is from which procedures/fuctions.
Thanks,
Re: sql_id [message #388912 is a reply to message #388911] Thu, 26 February 2009 11:00 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Sql_ID is associated with a sql statement and not tied with any procedure or function. As far as I know only way to trace it back is find the sql statement and check for the sql statement in user_source.

Regards

Raj
Re: sql_id [message #388915 is a reply to message #388912] Thu, 26 February 2009 11:20 Go to previous messageGo to next message
averion
Messages: 42
Registered: January 2009
Location: US
Member
Thanks Raj,

But I need to modify certain queries in procedure/function/packages and all I have is the SQL_ID and the statements.

How can I find out which pl/sql statements is in which procedure/function/package.

Regards,
Re: sql_id [message #388921 is a reply to message #388915] Thu, 26 February 2009 11:53 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If they are static SQL, use "grep" on the source.
If they are dynamic SQL, you can't. Ask the developers.

Regards
Michel
Re: sql_id [message #388923 is a reply to message #388911] Thu, 26 February 2009 11:56 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>all I have is the SQL_ID and the statements.
How were these SQL_IDs obtained & by who?

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you & please be consistent & correct in your postings.
Re: sql_id [message #388967 is a reply to message #388923] Thu, 26 February 2009 16:54 Go to previous message
gintsp
Messages: 118
Registered: February 2007
Senior Member
on 10g program_id and program_line# in v$sql if the necessary sql is in cache. Otherwise just search user/all/dba_source if it from stored program units.
Previous Topic: populate sequence
Next Topic: Where vs join (faster query )
Goto Forum:
  


Current Time: Thu Dec 08 12:52:23 CST 2016

Total time taken to generate the page: 0.05453 seconds