Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to match hash_value

RE: How to match hash_value

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Fri, 9 Feb 2007 14:13:47 -0800
Message-ID: <22EC50E60931494FA666A8CF8260C45B5D9C19@ALVMBXW05.prod.quest.corp>


Would the dump function do the trick?

SQL> select sql_text, dump (sql_text) from v$sql where rownum = 1 ;

SQL_TEXT



DUMP(SQL_TEXT)

select count(*) as ISDBA from session_roles where role = 'DBA'
Typ=1 Len=62: 115,101,108,101,99,116,32,99,111,117,110,116,40,42,41,32,97,115,32,73,83,68,66,65,32,1
02,114,111,109,32,115,101,115,115,105,111,110,95,114,111,108,101,115,32,119,104,101,114,101,32,114,1
11,108,101,32,61,32,39,68,66,65,39
 

-----Message d'origine-----
De : oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] De la part de Allen, Brandon Envoyé : vendredi, 9. février 2007 12:53 À : oracle-l-freelists
Objet : How to match hash_value

Hi List,  

I'm trying to do the ol' stored outline swap-a-roo trick and I'm trying to mimic the query coming from an application, but can't get it to come out with the exact same hash_value even though I have the exact same query text, with the same case and it appears to have the same white space as you can see below, so why don't they have the same hash_value? Any ideas what I'm missing? I suspect it may be a difference in the white spaces, e.g. I have spaces where the original has a tab, but how can I find out what the white spaces are supposed to be?

Thanks,
Brandon  

SQL> select hash_value, sql_text from v$sql where hash_value in (3486651370,1343167348);

HASH_VALUE



SQL_TEXT


3486651370
SELECT s1.spec_template_id,s1.spec_id,s2.spec_template_id ass_spec_template_id,
 s2.spec_id ass_spec_id,s1.company_id,
s1.project_id,s1.spec_class_type,s2.spec
_class_type ass_spec_class_type,sa.ass_type FROM IBS_SPEC s1, IBS_SPEC
s2, IBS_
SPEC_ASSIGNMENTS sa WHERE s1.spec_id = sa.spec_id AND s2.spec_id = :1 AND sa.
ass_spec_id = :2

1343167348
SELECT s1.spec_template_id,s1.spec_id,s2.spec_template_id ass_spec_template_id,
 s2.spec_id ass_spec_id,s1.company_id,
s1.project_id,s1.spec_class_type,s2.spec
_class_type ass_spec_class_type,sa.ass_type FROM IBS_SPEC s1, IBS_SPEC
s2, IBS_
SPEC_ASSIGNMENTS sa WHERE s1.spec_id = sa.spec_id AND s2.spec_id = :1 AND sa.
ass_spec_id = :2

Privileged/Confidential Information may be contained in this message or attachments hereto. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of this company shall be understood as neither given nor endorsed by it.

--
http://www.freelists.org/webpage/oracle-l




--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 09 2007 - 16:13:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US