Unregister lost mview
Hi, need a help with cleaning orphaned records from mview logs. How exactly this happenes:
1) Having two databases, one contains master table and associated mlog, the other the mview
2) After dropping second db without unregistering it first I would usually use DBMS_MVIEW.UNREGISTER_MVIEW on the first db, to clean waiting records from the mlog and unregistering the now lost subscriber, am I right?
Now here is the issue. If I refresh or recreate the second database instead of simply dropping it and then recreate the mview the same way as I did previously, the same name and owner, it register the same way in the source database. Now I have only one record in dba_registered_mviews but in the slog$ I see two of them and mlog starts growing, as it keeps record for now non-existing old db too. But the thing is, I cannot do DBMS_MVIEW.UNREGISTER_MVIEW in this case because SITE parameter, which is required, now belongs to the new registration.