The SNAPDETAILLOG administrative view and the SNAP_GET_DETAILLOG table function return snapshot information from the detail_log logical data group.
This administrative view allows you to retrieve snapshot information from the detail_log logical data group for the currently connected database.
Used in conjunction with ADMIN_GET_STORAGE_PATHS, MON_GET_HADR, MON_GET_MEMORY_POOL, and SNAPDB, the SNAPDETAILLOG administrative view provides information equivalent to the GET SNAPSHOT FOR DATABASE on database-alias CLP command.
The schema is SYSIBMADM.
Refer to Table 1 for a complete list of information that is returned.
In a non-restrictive database, SELECT privilege is granted to PUBLIC when the view is automatically created.
SELECT SUBSTR(DB_NAME, 1, 8) AS DB_NAME, FIRST_ACTIVE_LOG,
LAST_ACTIVE_LOG, CURRENT_ACTIVE_LOG, CURRENT_ARCHIVE_LOG,
DBPARTITIONNUM
FROM SYSIBMADM.SNAPDETAILLOG ORDER BY DBPARTITIONNUM
DB_NAME FIRST_ACTIVE_LOG LAST_ACTIVE_LOG ...
-------- -------------------- -------------------- ...
TEST 0 8 ...
TEST 0 8 ...
TEST 0 8 ...
3 record(s) selected.
... CURRENT_ACTIVE_LOG CURRENT_ARCHIVE_LOG DBPARTITIONNUM
... -------------------- -------------------- --------------
... 0 - 0
... 0 - 1
... 0 - 2
The SNAP_GET_DETAILLOG table function returns the same information as the SNAPDETAILLOG administrative view.
Used in conjunction with ADMIN_GET_STORAGE_PATHS, MON_GET_HADR, MON_GET_MEMORY_POOL, and SNAP_GET_DB, the SNAPDETAILLOG administrative view provides information equivalent to the GET SNAPSHOT FOR ALL DATABASES CLP command.
Refer to Table 1 for a complete list of information that is returned.
>>-SNAP_GET_DETAILLOG--(--dbname--+----------+--)-------------->< '-, member-'
The schema is SYSPROC.
If both dbname and member are set to NULL, an attempt is made to read data from the file created by SNAP_WRITE_FILE procedure. Note that this file could have been created at any time, which means that the data might not be current. If a file with the corresponding snapshot API request type does not exist, then the SNAP_GET_DETAILLOG table function takes a snapshot for the currently connected database and database member number.
In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the function is automatically created.
SELECT SUBSTR(DB_NAME, 1, 8) AS DB_NAME, FIRST_ACTIVE_LOG,
LAST_ACTIVE_LOG, CURRENT_ACTIVE_LOG, CURRENT_ARCHIVE_LOG
FROM TABLE(SNAP_GET_DETAILLOG('', 1)) AS T
DB_NAME FIRST_ACTIVE_LOG LAST_ACTIVE_LOG ...
-------- -------------------- -------------------- ...
TEST 0 8 ...
1 record(s) selected.
... CURRENT_ACTIVE_LOG CURRENT_ARCHIVE_LOG
... -------------------- --------------------
... 0 -
Column name | Data type | Description or corresponding monitor element |
---|---|---|
SNAPSHOT_TIMESTAMP | TIMESTAMP | The date and time that the snapshot was taken. |
DB_NAME | VARCHAR(128) | db_name - Database name |
FIRST_ACTIVE_LOG | BIGINT | first_active_log - First active log file number |
LAST_ACTIVE_LOG | BIGINT | last_active_log - Last active log file number |
CURRENT_ACTIVE_LOG | BIGINT | current_active_log - Current active log file number |
CURRENT_ARCHIVE_LOG | BIGINT | current_archive_log - Current archive log file number |
DBPARTITIONNUM | SMALLINT | dbpartitionnum - Database partition number monitor element |
MEMBER | SMALLINT | member - Database member monitor element |