The 

"order by st1.hash_value,ss.text_subset; -- deadlock avoidance"

Statement in the following Statspack code causes the package not to compile.
Oracle 9.2.0.4.0 64 bit.

Compatible is set to 9.2.0

If I remove the two ORDER BY's in error the package compiles fine.  Could
not find anything on Google or Metalink about this.


insert into stats$sqltext
                 ( hash_value
                 , text_subset
                 , piece
                 , sql_text
                 , address
                 , command_type
                 , last_snap_id
                 )
            select st1.hash_value
                 , ss.text_subset
                 , st1.piece
                 , st1.sql_text
                 , st1.address
                 , st1.command_type
                 , ss.snap_id
              from v$sqltext         st1
                 , stats$sql_summary ss
             where ss.snap_id         = l_snap_id
               and ss.dbid            = p_dbid
               and ss.instance_number = p_instance_number
               and st1.hash_value     = ss.hash_value
               and st1.address        = ss.address
               and not exists (select 1
                                 from stats$sqltext st2
                                where st2.hash_value  = ss.hash_value
                                  and st2.text_subset = ss.text_subset
                              )
             order by st1.hash_value,ss.text_subset; -- deadlock avoidance
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Post, Ethan
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to