RE: UTL_RAW.CAST_TO_VARCHAR2

From: Neil Chandler <neil_chandler_at_hotmail.com>
Date: Sun, 3 Mar 2013 00:54:34 +0000
Message-ID: <DUB113-W1212910A35BD3E0D5391DC85F90_at_phx.gbl>



If you are interested in using the UTL_RAW.CAST_TO_VARCHAR2, then the correct input is raw hex, rather than the contents of optimizer_env. For example, it's quite useful in decoding the low/high values in DBA_TAB_COLUMNS   1* select table_name,column_name,low_value,utl_raw.cast_to_varchar2(low_value) Actual from user_tab_columns where table_name = 'TEST1'SQL> /
TABLE_NAME                     COLUMN_NAME                    LOW_VALUE            ACTUAL------------------------------ ------------------------------ -------------------- --------------------TEST1                          COL1                           4141414141           AAAAA

SQL> select min(col1) from test1;
MIN(COL1)----------AAAAA
If you are interested in the contents of v$sql.optimizer_env (or dba_hist_optimizer_env), I'm afraid I don't know how to decode that. I think Julian Dyke may have an explanation for it somewhere on his website? Maybe. regards
Neil Chandler.
> Date: Mon, 4 Feb 2013 14:09:21 -0800
> From: leizeng2003_at_yahoo.com
> SQL> select
> utl_raw.cast_to_varchar2(OPTIMIZER_ENV)
> from D 2 BA_HIST_OPTIMIZER_ENV where
> optimizer_env_hash_value)66359101;
>
> UTL_RAW.CAST_TO_VARCHAR2(OPTIMIZER_ENV)
> --------------------------------------------------------------------------------
> ‘‘‘‘&‘
> = ‘‘‘‘‘‘3 VAEUQ‘!UUUETUXYUD‘e‘U‘UUQUQQ"UT‘‘
>
> How
> I can get a meaningful string from UTL_RAW.CAST_TO_VARCHAR2?
> Did I miss anything?
                                               

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Mar 03 2013 - 01:54:34 CET

Original text of this message