• Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

Comments (2)

1 mholzbauer commented Permalink

Update:
If anyone uses the (now unsupported) Versions 7.x and 9.x, please use following queries:

 
7. list of all backups (onbar level 0)
SELECT a.act_start AS begin, d.act_end AS end,
(d.act_end - a.act_start) AS duration
FROM bar_action a, bar_object b, bar_instance c, bar_action d, bar_object e
WHERE a.act_oid = b.obj_oid
AND a.act_aid = c.ins_aid
AND b.obj_oid = c.ins_oid
AND c.ins_level = 0
AND a.act_status = 0
AND b.obj_type = 'R'
AND e.obj_type = 'L'
AND e.obj_oid = d.act_oid
AND (c.ins_first_log + 0) = TRIM(e.obj_name)
ORDER BY 1 ASC;
 
8. fastest backup (onbar level 0)
SELECT FIRST 1 a.act_start AS begin, d.act_end AS end,
(d.act_end - a.act_start) AS duration
FROM bar_action a, bar_object b, bar_instance c, bar_action d, bar_object e
WHERE a.act_oid = b.obj_oid
AND a.act_aid = c.ins_aid
AND b.obj_oid = c.ins_oid
AND c.ins_level = 0
AND a.act_status = 0
AND b.obj_type = 'R'
AND e.obj_type = 'L'
AND e.obj_oid = d.act_oid
AND (c.ins_first_log + 0) = TRIM(e.obj_name)
ORDER BY 1 ASC;
 
9. slowest backup (onbar level 0)
SELECT FIRST 1 a.act_start AS begin, d.act_end AS end,
(d.act_end - a.act_start) AS duration
FROM bar_action a, bar_object b, bar_instance c, bar_action d, bar_object e
WHERE a.act_oid = b.obj_oid
AND a.act_aid = c.ins_aid
AND b.obj_oid = c.ins_oid
AND c.ins_level = 0
AND a.act_status = 0
AND b.obj_type = 'R'
AND e.obj_type = 'L'
AND e.obj_oid = d.act_oid
AND (c.ins_first_log + 0) = TRIM(e.obj_name)
ORDER BY 1 DESC;
 
 
Markus

2 mholzbauer commented Permalink

one more Query:

 
10. Backup Size
--
-- IDS Version 7.x and 9.x:
--
SELECT TRUNC(((SELECT SUM(a.npused * f.sh_pagesize) FROM sysptnhdr a, sysshmvals f)
+ (SELECT SUM(b.used * c.sh_pagesize) FROM syslogfil b, sysshmvals c WHERE bitval(b.flags, '0x2') = 1)
+ (SELECT SUM(d.pl_phyused * e.sh_pagesize) FROM sysplog d, sysshmvals e))/1024/1024/1024,0) AS backup_size_gb
FROM systables WHERE tabid = 1;
 
 
--
-- IDS Version 10 and higher:
--
SELECT TRUNC(((SELECT SUM(a.npused * a.pagesize) FROM sysptnhdr a)
+ (SELECT SUM(b.used * c.sh_pagesize) FROM syslogfil b, sysshmvals c WHERE bitval(b.flags, '0x2') = 1)
+ (SELECT SUM(d.pl_phyused * e.sh_pagesize) FROM sysplog d, sysshmvals e))/1024/1024/1024,0)
AS backup_size_gb
FROM sysdual;

Add a Comment Add a Comment