RDB/Oracle

oracle snapshot 관리

세모데 2018. 9. 18. 17:48

1. see the snapshot config


select * from dba_hist_wr_control;



2. see the snapshot history


select * from dba_hist_snapshot;



3. modify snapshot config


begin

    dbms_workload_repository.modify_snapshot_settings (

           retention =>  11520,   -- minute

           interval => 60,

           topnsql => 100,

           dbid => 134234234,

           con_id => ??

    );

end;

/


=> change config info for retention, interval, topnsql...



4. create snapshot manually


begin

    dbms_workload_repository.create_snapshot();

end;

/


or


exec dbms_workload_repository.create_snapshot;



5. delete snapshot manually


begin

    dbms_workload_repository.drop_snapshot_range(

           low_snap_id => 150,

           high_snap_id => 350,

           dbid => 134234234);

end;

/