The CREATE_SNAPSHOT procedure triggers the generation of a snapshot for a cluster.
Applicability
This system package is only supported for execution in the sys tenant.
Syntax
DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT(
flush_level VARCHAR(64) DEFAULT 'TYPICAL'
);
Parameters
| Parameter | Description |
|---|---|
| flush_level | Specifies the type of snapshot. Currently, only the TYPICAL snapshot is supported, which is used to collect most statistical data. |
Considerations
After a user manually creates a snapshot, the timer is reset. For example, in the default INTERVAL of 1 hour:
12:21 The timer triggers the creation of a snapshot.
13:21 The timer triggers the creation of the next snapshot.
13:45 A user manually creates a snapshot.
14:45 The timer triggers the creation of the next snapshot.
Examples
Manually create a new cluster snapshot and collect data periodically.
obclient(root@sys)[(none)]> CALL DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT(flush_level => 'TYPICAL');
References
For more information about snapshots in WR, see Set a snapshot policy.