HOW TO
Organizations sometimes require the ability to monitor and report the daily volume of activity occurring in their versioned geodatabase.
The following queries provide insight into how many states (edit operations) are occurring each day and the number of states in the geodatabase for each day.
This information can be used to graph the workload that the organization is performing and identify any inconsistencies in the organizations workflow. For example, if the number of states continues to increase from day to day, it could indicate that the compress command is not being executed or is encountering errors.
Code:
SQL> SELECT COUNT(ROUND(creation_time, 'DDD')) "EXISTING STATES",
2 max(state_id) - min(state_id) "STATES CREATED", ROUND(creation_time, 'DDD') “DAY”
3 FROM sde.states
4 GROUP BY ROUND(creation_time, 'DDD')
5 ORDER BY 3;
EXISTING STATES STATES CREATED DAY
--------------- -------------- ---------
15 6582 17-JUN-08
50 6750 18-JUN-08
762 6800 19-JUN-08
1099 7004 20-JUN-08
748 3712 21-JUN-08
Code:
SQL> SELECT COUNT(creation_time) "CURRENT ACTIVE STATES",
2 max(state_id) - min(state_id) "EDIT OPERATIONS TODAY",
3 TO_CHAR(SYSDATE, 'MON-DD-YYYY HH:MI:SS PM') "MOMENT"
4 FROM sde.states
5 WHERE creation_time > ROUND (SYSDATE, 'DDD') - 1;
CURRENT ACTIVE STATES EDIT OPERATIONS TODAY MOMENT
--------------------- --------------------- -----------------------
3695 28599 JUL-29-2008 05:25:15 PM
Article ID: 000010192
Get help from ArcGIS experts
Download the Esri Support App