Question

I was looking a way to query the last backup per type (full, delta, inc) via SQL instead of parsing the output of "list history backup", and I found in old documentation a function called ADMIN_LIST_HIST. However, I do not see any documentation in recent InfoCenters (9, 9.5, 9.7 nor 10.1), only in the good old 8.2.

I can still execute (in 9.7) a query with that table function, but I would like to know if it is deprecated, if it has changed since v8.2, if it is still supported.

Do you know something about this? This is a nice tool to query the last backups (inc, delta, full) and to query other executed commands.

(I know that I can get the last timestamp backup from SNAPSHOT_DATABASE.SNAPSHOT_DATABASE, but I wanted to filter per type: full, incremental, delta)

Was it helpful?

Solution

SYSPROC.ADMIN_LIST_HIST() is still there, but IBM introduced the SYSIBMADM.DB_HISTORY view in DB2 9.1 and it's the preferred method for getting this data.

FYI, a quick query to SYSCAT.VIEWS shows that SYSIBMADM.DB_HISTORY just wraps the old SYSPROC.ADMIN_LIST_HIST() table function in a view.

However, IBM have publicly stated that many of these table functions are being replaced by views. Presumably this allows IBM the ability to keep a view consistent while modifying the underlying table function(s) if necessary.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top