Tuesday, April 17, 2012

sprepsql in 11g.


   It works in 11g. I tested in VASP database.  The hash value is still using old_hash_value.
SQL> select hash_value , old_hash_value,child_number from v$sql  where old_hash_value=3222739199;
HASH_VALUE OLD_HASH_VALUE CHILD_NUMBER
---------- -------------- ------------
2541016949     3222739199            0
2541016949     3222739199            3
                              11916 08 Mar 2012 15:00     6
                              11921 08 Mar 2012 16:00     6
--error when uses HASH_VALUE
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 11916
Begin Snapshot Id specified: 11916
Enter value for end_snap: 11921
End   Snapshot Id specified: 11921
Specify the old (i.e. pre-10g) Hash Value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for hash_value: 2541016949
Hash Value specified is: 2541016949

declare
*
ERROR at line 1:
ORA-20200: Hash value 2541016949 does not exist in end snapshot
ORA-06512: at line 66
--Correct when uses OLD_HASH_VALUE
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 11916
Begin Snapshot Id specified: 11916
Enter value for end_snap: 11921
End   Snapshot Id specified: 11921
Specify the old (i.e. pre-10g) Hash Value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for hash_value: 3222739199
Hash Value specified is: 3222739199
...