--ORACLE_HOME/rdbms/admin/utlxrw.sql
--select * from REWRITE_TABLE

declare
v_sqlid varchar2(100) := 'fkcrvj9nbaf46';
v_sql_fullText clob;
begin
select sql_fullText into v_sql_fullText from v$sql where sql_id = v_sqlid;

dbms_mview.EXPLAIN_REWRITE(v_sql_fullText, 'DMIRANDA.VMR_SGAGST', 'dmd2');

end;
/

commit;
