ORA-20020: Database/Instance/Snapshot mismatch ...
SQL> SQL> set linesize 300 pagesize 300
SQL> select * from table(dbms_workload_repository.awr_sql_report_text((SELECT DBID FROM V$DATABASE), (SELECT INSTANCE_NUMBER FROM V$INSTANCE), :BgnSnap,:EndSnap, '&sql_id'));
old 1: select * from table(dbms_workload_repository.awr_sql_report_text((SELECT DBID FROM V$DATABASE), (SELECT INSTANCE_NUMBER FROM V$INSTANCE), :BgnSnap,:EndSnap, '&sql_id'))
new 1: select * from table(dbms_workload_repository.awr_sql_report_text((SELECT DBID FROM V$DATABASE), (SELECT INSTANCE_NUMBER FROM V$INSTANCE), :BgnSnap,:EndSnap, '36psp2j8kf741'))
select * from table(dbms_workload_repository.awr_sql_report_text((SELECT DBID FROM V$DATABASE), (SELECT INSTANCE_NUMBER FROM V$INSTANCE), :BgnSnap,:EndSnap, '36psp2j8kf741'))
*
ERROR at line 1:
ORA-20020: Database/Instance/Snapshot mismatch <<<<<<<<<<<<<<<<<<<<<<<<<<<-----
ORA-06512: at "SYS.DBMS_SWRF_REPORT_INTERNAL", line 16546
ORA-06512: at "SYS.DBMS_SWRF_REPORT_INTERNAL", line 25068
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 1365
ORA-06512: at line 1
select address, hash_value, executions, loads, version_count, invalidations, parse_calls
from v$sqlarea
where sql_text like ('select * from table(dbms_workload_repository%');
ADDRESS HASH_VALUE EXECUTIONS LOADS VERSION_COUNT INVALIDATIONS PARSE_CALLS
---------------- ---------- ---------- ---------- ------------- ------------- -----------
00000005F6F0E058 1266709388 1 1 1 0 1
00000005780680E8 433367347 1 1 1 0 1
exec dbms_shared_pool.purge ('00000005F6F0E058,1266709388 ','C');
PL/SQL procedure successfully completed.
SQL> SQL>
exec dbms_shared_pool.purge ('00000005780680E8,433367347','C');SQL> SQL>
PL/SQL procedure successfully completed.
SQL> exec dbms_shared_pool.purge ('00000005F6F0E058,1266709388','C');
PL/SQL procedure successfully completed.
===============
run again ...