I have many snapshots configured in my database.I have also created dbms_snapshot package used to refresh the snapshots,but when I try to manually try to refresh the snapshot using the package ,it gives me the following error.
Can anyone tell me why does it happen.
SQL> exec sys.dbms_snapshot.refresh('AMOLP.DEPT_SNAP','C');
begin sys.dbms_snapshot.refresh('AMOLP.DEPT_SNAP','C'); end;
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04067: not executed, package body "SYS.DBMS_SNAPSHOT" does not exist
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 1
It means you have made the package discarded which is already created. It may be with the packages getting conflict with each other. Try and work out the earlier (similar) package, i think it wont work.
Better you drop the snapshot group by using dbms_repcat.drop_snapshot_repgroup(). So, that the objects will be completely dropped.
Then recreate the snapshot,group and object.
I hope it will help you.
Click Here to Expand Forum to Full Width