Skip to content

Archive for

Query to find database backup time – Netezza

You can use below query to find database backup time in Netezza environment. This query will provide the database backup time (Full / Differential / User backup) for each database along with the backup start and finish time. Query will not display any data for failed database backup attempts.
Here we will query system view _v_backup_history in system database.

select DBName, OPTYPE, starttime, lastupdate, (lastupdate-starttime)/60 as DurationInMinutes from _v_backup_history
where status='COMPLETED' and DBNAME is NOT NULL
and StartTime>'2012-10-01 00:00:00'
order by DBName, starttime 

Unfortunately, we cannot retrieve the backup location as it is not stored in any system table/view in Netezza. For that we have to look into the backup log file.

Query to find all the resource groups in a Netezza system

You can run below query to find all the resource groups in a Netezza system. The output of this query will also give us the maximum and minimum resource allocation values in percentage.
To get these details we will query system view _v_group in system database.

select GROUPNAME as "Resource Group",GRORSGPERCENT as "Min Resource",RSGMAXPERCENT as "Max Resource"
from _v_group where grorsgpercent<>0