Tag: snapshot

How to drop snapshots?

-- drop snapshot, it will not generate an error if the snap id is out of range SQL> EXEC dbms_workload_repository.drop_snapshot_range(low_snap_id=>1, high_snap_id=>10); PL/SQL procedure successfully completed.

Database snapshot

In SQL Server snapshot can be created which creates a point in time read-only copy of any database. The amount of space is less that the actual database as it stores the pages that have changed, it has a copy of the page before the change was made. The snapshot database is a read-only database. … Continue reading Database snapshot

snapshot controlfile and RMAN-08512

As RMAN needs a consistent view of the control file it takes a backup of the controlfile by creating a snapshot and during the backup RMAN uses the snapshot of the controlfile. By default the snapshot controlfile is created in $ORACLE_HOME/dbs/snapcf_ORACLE_SID.f which can be changed by setting the following parameter in RMAN $ rman target … Continue reading snapshot controlfile and RMAN-08512

How to create a on-demand AWR snapshot?

Using dbms_workload_repository.create_snapshot() one can create AWR snapshot. Example: Creates the snapshot and returns the snap id. If 'ALL' is not passed it defaults to typical (statistics_level). SQL> select dbms_workload_repository.create_snapshot('ALL') from dual; DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT() ------------------------------------------ 856 1 row selected. To view snapshot SQL> select end_interval_time, error_count from DBA_HIST_SNAPSHOT where snap_id = 856; END_INTERVAL_TIME ERROR_COUNT --------------------------------------------------------------------------- ----------- 25-AUG-10 … Continue reading How to create a on-demand AWR snapshot?

How to change AWR retention, interval, topnsql?

Using dbms_workload_repository.modify_snapshot_settings, one can modify retention, interval, and topnsql. 1- Get the dbid which is needed to passs to dbms_workload_repository.modify_snapshot_settings SQL> select dbid from v$database; DBID ---------- 1992878807 2- Set retention, interval and top sql: retention=>value in minutes so (45 days * 24 (hours per day) * 60 minutes per hour = 64800), max value … Continue reading How to change AWR retention, interval, topnsql?