SQL Queries - CAST Central Base - Queries on snapshots - How to get the duration of a snapshot
Purpose of Query
The query will provide the duration of a snapshot.
Applicable in CAST Version
| Release | Yes/No |
|---|---|
| 8.2.x | ✅ |
| 8.1.x | ✅ |
| 8.0.x | ✅ |
| 7.3.x | ✅ |
Applicable RDBMS
| RDBMS | Yes/No |
|---|---|
| Oracle Server | ✅ |
| Microsoft SQL Server | ✅ |
| CSS2 | ✅ |
Query for CSS
SELECT snapshot_id,
snapshot_name,
compute_start_date,
compute_end_date,
compute_end_date - compute_start_date "TOTAL RUNTIME OF SNAPSHOT"
FROM <CENTRAL>.dss_snapshots
ORDER BY snapshot_id DESC;
Query result example
25;“Computed on 201709292225”;“2017-10-02 17:03:21.757”;“2017-10-03 21:37:02.291”;“1 day 04:33:40.534”
24;“Computed on 201709262058”;“2017-09-26 23:40:52.26”;“2017-09-27 02:47:12.435”;“03:06:20.175”
23;“Computed on 201709191323”;“2017-09-19 15:43:15.877”;“2017-09-19 18:30:43.074”;“02:47:27.197”
22;“Computed on 201709181808”;“2017-09-18 20:35:57.352”;“2017-09-18 23:43:33.939”;“03:07:36.587”
21;“Computed on 201709141525”;“2017-09-14 18:07:33.935”;“2017-09-14 21:30:37.436”;“03:23:03.501”
[…]
Query result interpretation
Snapshot 25 last 1 day 4 hours 33 minutes
Snapshot 24 last 03 hours and 6 minutes
Snapshot 23 last 02 hours and 47 minutes
Snapshot 22 last 03 hours and 07 minutes
Query for Oracle
Same as CSS2
Query result example
Query result interpretation
Query for SQL server
Same as CSS2
Query result example
Query result interpretation
Notes/comments
Related Pages